2. The sum of the first $n$ terms of the sequence $1,(1+2),\left(1+2+2^{2}\right), \cdots,\left(1+2+2^{2}+\cdots+2^{n}\right.$ ' $)$ expressed in terms of $n$ is
A. $2^{n}$
B. $2^{n}-n$
C. $2^{n+1}-n$
D. $2^{n 11}-n-2$
2. D It is known that the $k$-th term of the sequence equals $1+2+2^{2}+\cdots+2^{k-1}=2^{k}-1$, so the sum of the first $n$ terms can be written as
$$
\begin{array}{l}
\left(2^{1}-1\right)+\left(2^{2}-1\right)+\left(2^{3}-1\right)+\cdots+\left(2^{n}-1\right) \\
=\left(2+2^{2}+2^{3}+\cdots+2^{n}\right)-\underbrace{(1+1+1+\cdots+1)}_{n} \\
=\left(2^{n+1}-2\right)-n=2^{n+1}-n-2 \text {. } \\
\end{array}
$$

Therefore, the answer is D.