1. Let $a_{n}=(-1)^{n}(n+1)$, find the generating function of the sequence $\left\{a_{n}\right\}$.
1. Given $a_{n}: 1,-2,3,-4, \cdots,(-1)^{n}(n+1), \cdots$
$$
\text { we have } \begin{aligned}
& 1-2 x+3 x^{2}-4 x^{3}+\cdots+(-1)^{n}(n+1) x^{n}+\cdots \\
= & 1-C_{2}^{1} x+C_{3}^{2} x^{2}-C_{4}^{3} x^{3}+\cdots+(-1)^{n} C_{n+1}^{n} x^{n}+\cdots \\
= & \sum_{k=0}^{\infty} C_{k+1}^{k}(-x)^{k}=\sum_{k=0}^{\infty} C_{2+k-1}^{k}(-x)^{k}=\frac{1}{[1-(-x)]^{2}}=\frac{1}{(1+x)^{2}} .
\end{aligned}
$$

Therefore, the generating function of the sequence $\left\{a_{n}\right\}$ is $f(x)=\frac{1}{(1+x)^{2}}$.