Exchange all the new $n$ yuan into 1 yuan and 2 yuan banknotes. How many different exchange methods are there?


Let there be $a_{n}$ different ways of exchange, then $a_{n}=\sum_{4_{1}+22_{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}+2_{2},-n} 1\right) x^{n} \\
& =\sum_{t_{1}=0}^{\infty} \sum_{s_{2}=0}^{\infty} x^{t_{1}+2 t_{2}}=\left(\sum_{t_{1}=0}^{\infty} x_{1}^{t_{1}}\right)\left(\sum_{h_{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) gives $A+B+$ $C=1$, so $B=1-(A+C)=1-\frac{3}{4}=\frac{1}{4}$, hence
$$
\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} \mathrm{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} .
\end{aligned}
$$

Therefore, $a_{n}=\frac{n+1}{2}+\frac{1+(-1)^{n}}{4}$. That is, there are $\frac{n+1}{2}+\frac{1+(-1)^{n}}{4}$ ways of exchange.