1

The question is: find the generating function for $(f_0,f_1,f_2,...)$ where $f_{n} = f_{n-1}+ 2f_{n-3}$ and $f_0 =0$ and $f_1 = f_2 = 1 $ I have solved this and reached G(x) = $(x-2)\over(2{x^3} + x - 1)$ but I see in Wolfram Alpha that this is not the answer

Can anyone Help?


update: my solution : $$G(x) = \sum_{n=0}^\infty f_nx^n = \sum_{n=3}^\infty f_nx^n + f_0+ f_1 + f_2 = \sum_{n=3}^\infty f_nx^n + 2$$

$$G(x)-2 =\sum_{n=3}^\infty (f_{n-1}+ 2f_{n-3})x^n = \sum_{n=3}^\infty f_{n-1}x^n + 2\sum_{n=3}^\infty f_{n-3}x^n$$ $$G(x) -2 = \sum_{n=2}^\infty f_nx^{n+1} + 2\sum_{n=0}^\infty f_nx^{n+3} $$ $$G(x) - 2 = x(G(x)-1) + 2x^3G(x) $$ $$ G(x) = {(x-2)\over(2x^3+x-1)}$$

so whats wrong?

ReZa
  • 189
  • Welcome to Math.SE! Please, consider updating your question to include what you have tried and where you are getting stuck. That way, people on this site will know exactly what help you need. – Krokop May 27 '14 at 14:23
  • Also, fix your typesetting (use MathJax). – Batman May 27 '14 at 14:28
  • I suppose that your answer is effectively wrong. The development of the $G(x)$ you wrote is $2+x+x^2+5 x^3+7 x^4+9 x^5+19 x^6+O\left(x^7\right)$ which seems to be in contradiction with $f(0)=0$. – Claude Leibovici May 27 '14 at 14:36
  • Please check I didn't change anything while editing, there was a lot to do. – user88595 May 27 '14 at 14:46
  • 1
    Minor problem, it should be $x(G(x)-x-1)$ in next to last line. But there is another problem elsewhere. – André Nicolas May 27 '14 at 15:03
  • Same issue at the beginning, first line of update, you need to add $x+x^2$, not $2$. – André Nicolas May 27 '14 at 15:09
  • @AndréNicolas Why? Could you Explain Why it should be $x(G(x)-x-1)$? – ReZa May 27 '14 at 15:10
  • @AndréNicolas Yes i think this is the answer! Bad Mistake!! – ReZa May 27 '14 at 15:11
  • 1
    I would rather explain first line of update. But here goes about first comment. The sum of the terms from $2$ to infinity is $G(x)$ minus sum of first two terms. But I got the first term wrong. Same at the very beginning, the first three terms don't add up to $2$, but to $0+x+x^2$. – André Nicolas May 27 '14 at 15:13

1 Answers1

2

As pointed out in the comments, the issue is that you go from $$ \sum_{n=0}^\infty f_nx^n $$ to $$ \sum_{n=3}^\infty f_nx^n + f_0 + f_1 + f_2 = \sum_{n=3}^\infty f_nx^n + 2 $$ which is not right. It ought to be $$ \sum_{n=3}^\infty f_nx^n + f_0 + f_1x + f_2x^2 = \sum_{n=3}^\infty f_nx^n + x + x^2 $$ instead.

Simon Rose
  • 6,793
  • And the line next to last line should be $x(G(x)-x)$ the final answer is $G(x) = {x\over {1-x-2x^3}}$ – ReZa May 27 '14 at 15:26