Example 4 If the expansion of $\left(1+x+x^{2}\right)^{1000}$ is $a_{0}+a_{1} x+a_{2} x^{2}+\cdots+a_{2000} x^{2000}$,
then the value of $a_{0}+a_{3}+a_{6}+\cdots+a_{1998}$ is ( ).
(A) $3^{333}$
(B) $3^{666}$
(C) $3^{999}$
(D) $3^{2001}$
(2001, National High School Mathematics Competition)
Explanation: Let $f(x)=\left(1+x+x^{2}\right)^{1000}$
$$
\begin{array}{l}
=a_{0}+a_{1} x+a_{2} x^{2}+\cdots+a_{2000} x^{2000}, \\
\omega=\cos \frac{2 \pi}{3}+\mathrm{i} \sin \frac{2 \pi}{3},
\end{array}
$$
$$
\begin{array}{l}
\text { then } a_{0}+a_{3}+a_{6}+\cdots+a_{1998} \\
=\frac{f(1)+f(\omega)+f\left(\omega^{2}\right)}{3}=3^{999} .
\end{array}
$$

Therefore, the answer is (C).