In Exercises 24, write out the first 5 terms of the Binomial series with the given k-value. 24. k = 4

library(Ryacas0)
x <- Sym("x")
expression <- (1 + x)^4
expression_final <- Expand(expression)
print(expression_final)
## yacas_expression(x^4 + 4 * x^3 + 6 * x^2 + 4 * x + 1)

term 1: x^4
term 2: 4x^3
term 3: 6x^2
term 4: 4x
term 5: 1