Example 1. Given the sequence $\left\{a_{n}\right\}$ with the sum of the first $\mathrm{n}$ terms as $S_{n}=2^{n+1}-n(n+1)$, find $a_{n}$.
$$
\begin{array}{l}
\text { For } n \geqslant 2, a_{n}=S_{n}-S_{n-1}=2^{n}-2 n \text {. } \\
n=1 \text {, } a_{1}=S_{1}=2^{2}-2=2 \text {. } \\
\end{array}
$$
$\therefore$ The general term formula of the sequence is:
$$
a_{n}=\left\{\begin{array}{l}
2, n=1 ; \\
2^{n}-2 n, n \geqslant 2 .
\end{array}\right.
$$