How to use the generating function $F(x) =x/(1-x-x^2).$ The generating function for the Fibonacci sequence is
$$F(x) =x/(1-x-x^2).$$
To work out the 20th value of the sequence I understand you somehow expand this and look at the coefficient of $x^{20}$.  How exactly do you do this?

You can do the following:


*

*Solve the equation $1-x-x^2=0$. The roots are $\frac{-1-\sqrt{5}}{2}$  and $\frac{-1+\sqrt{5}}{2}$.

*Then you have $1-x-x^2=-(x-\frac{-1-\sqrt{5}}{2})(x-\frac{-1+\sqrt{5}}{2})=-(x+\frac{1+\sqrt{5}}{2})(x+\frac{1-\sqrt{5}}{2})$

*$\frac{-x}{(x+\frac{1+\sqrt{5}}{2})(x+\frac{1-\sqrt{5}}{2})}=\frac{A}{(x+\frac{1+\sqrt{5}}{2})}+\frac{B}{(x+\frac{1-\sqrt{5}}{2})}$

*Find A and B then you can expand both fractions in geometric series. 
$\frac{-x}{(x+\frac{1+\sqrt{5}}{2})(x+\frac{1-\sqrt{5}}{2})}=\frac{Ax+Bx+A\frac{1-\sqrt{5}}{2}+B+\frac{1+\sqrt{5}}{2}}{(x+\frac{1+\sqrt{5}}{2})(x+\frac{1-\sqrt{5}}{2})}=\frac{(A+B)x+A\frac{1-\sqrt{5}}{2}+B\frac{1+\sqrt{5}}{2}}{(x+\frac{1+\sqrt{5}}{2})(x+\frac{1-\sqrt{5}}{2})}$
Then  $(A+B)=-1$ and $A\frac{1-\sqrt{5}}{2}+B\frac{1+\sqrt{5}}{2}=0$
This s system gives  $A$ and $B$.


*

*Add the two series and you are done.

