2

Write a closed formula for the generating function of the sequence $a_n=(2n+3)(-1)^n$

So first I try

$A(z)=\sum_{z=0}^\infty (2n+3)(-1)^nz^n$

$=\sum_{n=0}^\infty [2(n+1)+1](-1)^nz^n$

$=2\sum_{n=0}^\infty (n+1)(-1)^nz^n + \sum_{n=0}^\infty (-1)^nz^n$

$=\frac2{(1+z)^2}+\frac1{1+z}$

However, the answer is $A(z)=\frac{-2z}{(1+z)^2}+\frac3{(1+z)}$

So I just wondered what is wrong with my method?

  • 1
    Nothing wrong, since $$\frac2{(1+z)^2}+\frac1{1+z}=\frac{-2z}{(1+z)^2}+\frac3{(1+z)}.$$ – Did Jun 12 '15 at 07:10
  • Did already said that your answer was right. You decomposed $(2n+3)(-1)^n$ as $2(n+1)(-1)^n+(-1)^n$ while the one who wrote the answer decomposed it as $2n(-1)^n+3(-1)^n$. – Clément Guérin Jun 12 '15 at 08:41

0 Answers0