Generating function for the sequence $(a_k) = (1,-1,2,-2,3,-3,4,-4,...).$

815 Views Asked by At

I'm trying to find the generating function for $(a_k)=(1,-1,2,-2,3,-3,4,-4,...)$. I know the answer is $$A(x) = \frac{1}{1-x} \cdot \frac{1}{(x+1)^2}$$ but I can't figure out how to get there.

First I broke down the sequence, $$(a_k) = 1-x+2x^2-2x^3+3x^4-3x^5+4x^6-4x^7+...$$ and tried working backwards by looking at each Taylor series separately, $$\frac{1}{1-x} = 1+x+x^2+x^3+... $$

$$\frac{1}{(x+1)^2}=1-2x+3x^2-4x^3+5x^4-... $$

The last thing I attempted was factoring,

$$(a_k)=(1-x+ 2x^2-2x^3+3x^4-3x^5+4x^6-4x^7+...$$

$$=(0-x+2x^2-2x^3+3x^4-3x^5+...)+1$$

$$=(-1+2x-2x^2+3x^3-3x^4+...)x + 1 $$

But from there I'm stuck. Would love some help!

1

There are 1 best solutions below

0
On

This is $$\sum_{i=1}^\infty i(x^2)^{i-1}-x\sum_{i=1}^\infty i(x^2)^{i-1}$$ which is equal to $$\frac1{(1-x^2)^2}-\frac x{(1-x^2)^2} = \frac{1-x}{(1-x)^2(1+x)^2}=\frac{1}{(1-x)(1+x)^2}$$ Here I have used the fact that $\sum_{i=1}^\infty{ix^{i-1}}$ is the derivative of a geometric series and used the substitution $x\mapsto x^2$.