Extending generating function into series. There is a reccurent equation: $a_{n+2}-2\cos(\phi)a_{n+1}+a_n=0$ and I must to solve it. I found generating function: $$A(t) = \dfrac{1 - t\cos(\phi)}{1 - 2t\cos(\phi) + t^2},$$ but I can not extend it into series to solve this equation. Please help me.
Set $z=te^{i\phi}$ then your generating function can be written as 
$$A(t)=\frac{1-t\cos(\phi)}{1-2t\cos(\phi)+t^2}=\frac{1-\frac{1}{2}(z+\bar{z})}{(z-1)(\bar{z}-1)}=\frac{(1-z)+(1-\bar{z})}{2(z-1)(\bar{z}-1)}=\frac{1}{2}(\frac{1}{1-z}+\frac{1}{1-\bar{z}})$$
For $|z|&lt;1$ we have the following series expansion
$$A(t)=\frac{1}{2}(\sum^{\infty}_{k=0}z^k+\sum^{\infty}_{k=0}\bar{z}^k)=\frac{1}{2}(\sum^{\infty}_{k=0}2t^k\cos(k\phi))=\sum^{\infty}_{k=0}t^k\cos(k\phi)$$
So you have $a_k=\cos(k\phi)$. Now notice that 
\begin{align}a_{k+2}-2\cos(\phi)a_{k+1}+a_k&amp;=\cos((k+2)\phi)-2\cos(\phi)\cos((k+1)\phi)+\cos(k\phi)\\&amp;
=\cos((k+2)\phi)-2(\frac{\cos((k+2)\phi)+\cos(k\phi)}{2})+\cos(k\phi)\\&amp;=
\cos((k+2)\phi)-\cos((k+2)\phi)\\&amp;=
0
\end{align}
so $a_k=\cos(k\phi)$ is a solution.
HINT:

$(e^{i n \theta})$ , $(e^{-i n \theta})$ or if you want, $(\cos(n \theta))$, $(\sin(n \theta))$ are solutions.