1. Let $\left(1+x+x^{2}\right)^{n}=a_{0}+a_{1} x+\cdots+a_{2 n} x^{2 n}$. Find the value of $a_{2}+a_{4}+\cdots+a_{2 n}$ is ( ).
(A) $3^{n}$
(B) $3^{n}-2$
(C) $\frac{3^{n}-1}{2}$
(D) $\frac{3^{n}+1}{2}$
$-1 . \mathrm{C}$.
Let $x=0$, we get $a_{0}=1$;
Let $x=-1$, we get
$$
a_{0}-a_{1}+a_{2}-a_{3}+\cdots+a_{2 n}=1;
$$

Let $x=1$, we get
$$
a_{0}+a_{1}+a_{2}+a_{3}+\cdots+a_{2 n}=3^{n} \text{. }
$$
(2) + (3) gives
$$
2\left(a_{0}+a_{2}+a_{4}+\cdots+a_{2 n}\right)=3^{n}+1 \text{. }
$$

Thus, $a_{0}+a_{2}+a_{4}+\cdots+a_{2 n}=\frac{3^{n}+1}{2}$.
From equation (1), we get $a_{2}+a_{4}+\cdots+a_{2 n}=\frac{3^{n}-1}{2}$.