# Math Help - Generating function for a sequence

1. ## Generating function for a sequence

The question is as follows:
It is known that the generating function for the sequence , {1,8,27,64,...} is
[x(x^2 + 4x +1)]/(1-x)^4
Use the result to show summation from r=1 to n of r^3 = [n^2(n^2+1)]/4

I know i have to find the sequence represented by 1,8,27,64, .. and once i get the sequence i have to manipulate it until i reach r^3 which will be given by the expression.
My problem is that i cannot find the sequence for 1,8,27,64,...
Thank buches!

2. Hello, mehn!

Please check the wording of the problem.
None of it makes sense.

It is known that the generating function for the sequence , {1, 8, 27, 64, ...}

. . is: .[x(x^2 + 4x +1)]/(1-x)^4 . What?

Use the result to show summation from r = 1 to n of r^3

. .is: .[n^2(n^2+1)]/4 . Not true

The generating function is: .f(r) = r^3
. . The terms are consecutive cubes.

The sum of the first n cubes is: .[n^2(n+1)^2]/4

3. Originally Posted by Soroban
Hello, mehn!

Please check the wording of the problem.
None of it makes sense.

The generating function is: .f(r) = r^3
. . The terms are consecutive cubes.

The sum of the first n cubes is: .[n^2(n+1)^2]/4

Please read Generating Functions. The OP's generating function for cubes is correct.

4. Originally Posted by mehn
The question is as follows:
It is known that the generating function for the sequence , {1,8,27,64,...} is
[x(x^2 + 4x +1)]/(1-x)^4
Use the result to show summation from r=1 to n of r^3 = [n^2(n^2+1)]/4
This is a strange problem (to me, at any rate), but it actually works!

The binomial series for (1-x)^{-4} is 1 + 4x + 10x^2 + 20x^3 + ... . When you multiply this by x(x^2 + 4x +1), you get x + 8x^2 + 27x^3 + 64x^4 + ... . The coefficients magically appear as the cubes of the integers!

In this problem, you are asked to find the sum of the first n coefficients. One way to do that is to multiply the given generating function by (1-x)^{-1} and looking for the coefficient of x^n in that product.

The coefficient of x^n in (1-x)^{-5} is $\frac{(n+4)!}{4!n!}$. So the coefficient of x^n in $\frac{x(x^2 + 4x +1)}{(1-x)^5}$ is

$\frac1{4!}\left(\frac{(n+1)!}{(n-3)!} + 4\frac{(n+2)!}{(n-2)!} + \frac{(n+3)!}{(n-1)!}\right),$

which eventually simplifies to [n^2(n+1)^2]/4.

Not the easiest way to get that formula, but an interesting piece of mathematics.

Edit. Thanks to alexmahone for that useful link. I hadn't seen his comment when writing mine.