Example 1: Exchange all $n$ yuan into 1 yuan and 2 yuan banknotes. How many different ways of exchange are there?
Let $a_{n}$ be the number of different brother exchange methods. Then, $a_{n}=\sum_{t_{1}+2 t_{2}=n} 1\left(t_{1}, t_{2}\right.$ are non-negative integers $), a_{n}$'s generating function is
$$
\begin{aligned}
f(x) & =\sum_{n=0}^{\infty} a_{n} x^{n}=\sum_{n=0}^{\infty}\left(\sum_{t_{1}+t_{2}=1} 1\right) x^{n}=\sum_{t_{1}=0}^{\infty} \sum_{t_{2}=0}^{\infty} x^{t_{1}+2 t_{2}} \\
& =\left(\sum_{t_{1}=0}^{\infty} x^{t_{1}}\right)\left(\sum_{t_{2}=0}^{\infty} x^{2 t_{2}}\right) \\
& =\left(\frac{1}{1-x}\right)\left(\frac{1}{1-x^{2}}\right)=\frac{1}{(1-x)^{2}(1+x)} \\
& =\frac{A}{(1-x)^{2}}+\frac{B}{1-x}+\frac{C}{1+x} .
\end{aligned}
$$

Thus, $A=\left.\frac{1}{1+x}\right|_{x=1}=\frac{1}{2}, C=\left.\frac{1}{(1-x)^{2}}\right|_{x=-1}=\frac{1}{4}$.
Setting $x=0$ in (1), we get $A+B+C=1$, so $B=1-(A+C)=1-\frac{3}{4}=\frac{1}{4}$. Therefore,
$$
\begin{aligned}
f(x) & =\sum_{n=0}^{\infty} a_{n} x^{n}=\frac{1}{2(1-x)^{2}}+\frac{1}{4(1-x)}+\frac{1}{4(1+x)} \\
& =\frac{1}{2} \sum_{n=0}^{\infty} C_{n+1}^{1} x^{n}+\frac{1}{4} \sum_{n=0}^{\infty} x^{n}+\frac{1}{4} \sum_{n=0}^{\infty}(-1)^{n} x^{n} \\
& =\sum_{n=0}^{\infty}\left(\frac{n+1}{2}+\frac{1+(-1)^{n}}{4}\right) x^{n}=\sum_{n=0}^{\infty} \frac{2 n+3+(-1)^{n}}{4} x^{n},
\end{aligned}
$$

Therefore, $a_{n}=\frac{2 n+3+(-1)^{n}}{4}$, meaning there are $\frac{2 n+3+(-1)^{n}}{4}$ different brother exchange methods.