Finding $S=\sum_{k=0}^n (-1)^k A_k{n\choose k}$, if $(1+x+x^2)^n=\sum_{k=0}^{2n} A_k x^k.$ \begin{align} (1+x+x^2)^n &= A_0+A_1x+A_2x^2+\dots+A_nx^n+\dots+A_{2n}x^{2n} \\ (1-1/x)^n &= {n \choose 0}-{n \choose 1}x^{-1}+{n\choose 2}x^{-2}+\dots+(-1)^nx^{-n} \end{align}
Multiplying these two we get $S=\sum_{k=0}^{n} (-1)^k A_k {n \choose k}=\text{Coefficient of $x^0$ in } (x^3-1)^n/x^n$
Or $S=\text{Coefficient of $x^n$ in } (x^3-1)^n=0$, when $n$ is not a multiple of $3$.
The question is how else we can prove this result? How to modify this result when $n$ is a multiple of $3$ (that is, $n=3p$)?
EDIT I find that if $n=3p$, then $S= \text{Coefficient of}~ x^{3p}$ in $(x^3-1)^{3p}={3p \choose p}$