This is from a derivation of de Moivre's theorem on p.148 of Grimmett & Stirzaker's Probability and Random Processes.
The setup:
The sequence $a_n = (\cos \theta + i \sin \theta)^n$ has generating function $$G_a(s) = \sum_{n=0}^\infty \left[ s(\cos\theta + i \sin\theta) \right]^n = \frac{1}{1 - s(\cos\theta + i \sin\theta)}$$ if $|s| < 1$; here $i = \sqrt{-1}$.
The part that I don't follow:
It is easily checked by examining the coefficient of $s^n$ that $$\left[1-s(\cos\theta + i \sin \theta) \right] \sum_{n=0}^\infty s^n \left[\cos(n\theta)+i \sin(n\theta) \right] = 1 $$ when $|s| < 1$.
The rest is clear to me, but in case you're interested:
Thus $$\sum_{n=0}^\infty s^n \left[\cos(n\theta)+i \sin(n\theta) \right] = \frac{1}{1-s(\cos\theta + i \sin \theta)}$$ if $|s| < 1$. Equating the coefficients of $s_n$ we obtain the well-known fact that $\cos(n\theta)+i \sin(n\theta) = (\cos\theta + i \sin\theta)^n$.
Thanks for any help!
It follows from the geometric series $\displaystyle \sum_{n = 0}^{\infty} x^n = \dfrac{1}{1-x}, |x| < 1$.