6. Let $\left(1+x+x^{2}\right)^{n}=\sum_{k=0}^{2 n} a_{k} x^{k}$. Then $\sum_{k=1}^{n} a_{2 k}=$ $\qquad$
6. $\frac{3^{n}-1}{2}$.

Let $x=0$, we get $a_{0}=1$.
Let $x=1$, we get $\sum_{k=0}^{2 n} a_{k}=3^{n}$.
Let $x=-1$, we get $\sum_{k=0}^{n} a_{2 k}-\sum_{k=1}^{n} a_{2 k-1}=1$.
Therefore, $\sum_{k=1}^{n} a_{2 k}=\frac{3^{n}-1}{2}$.