11・17 Let $\left(1+x+x^{2}\right)^{n}=a_{0}+a_{1} x+a_{2} x^{2}+\cdots+a_{2 n} x^{2 n}$ be an identity in $x$, if we define $S=a_{0}+a_{2}+a_{4}+\cdots+a_{2 n}$, then $S$ equals
(A) $2^{n}$.
(B) $2^{n}+1$.
(C) $\frac{3^{n}-1}{2}$.
(D) $\frac{3^{n}}{2}$.
(E) $\frac{3^{n}+1}{2}$.
(17th American High School Mathematics Examination, 1966)
[Solution 1] First, substitute $x=1$ and $x=-1$ into the identity respectively:
$$
\begin{array}{l}
(1+1+1)^{n}=3^{n}=a_{0}+a_{1}+a_{2}+\cdots+a_{2 n-1}+a_{2 n} . \\
{\left[1+(-1)+(-1)^{2}\right]^{n}=1^{n}=a_{0}-a_{1}+a_{2}-\cdots-a_{2 n-1}+a_{2 n} .}
\end{array}
$$

Adding the two equations on both sides, we get
$$
3^{n}+1=2 a_{0}+2 a_{2}+2 a_{4}+\cdots+2 a_{2 n},
$$

which simplifies to
$$
S=\frac{3^{n}+1}{2} \text {. }
$$

Therefore, the answer is $(E)$.
[Solution 2] Since the proposition holds for any $x$ and $n$, consider:
When $n=1$, $1+x+x^{2}=a_{0}+a_{1} x+a_{2} x^{2}$, which means $a_{0}=a_{2}=1$. Thus, $a_{0}+a_{2}=2$, so $(B),(C),(D)$ are not valid.
When $n=2$, $\left(1+x+x^{2}\right)^{2}=1+2 x+3 x^{2}+2 x^{3}+x^{4}$, we know $a_{0}=1, a_{2}=3, a_{4}=1$, so $a_{0}+a_{2}+a_{4}=5$, hence $(A)$ is not valid.
Therefore, the answer is $(E)$.