Roots of Unity Filters Suppose we want to evaluate
$$\sum_{k\geq 0} \binom{n}{3k}$$
This can be done using roots of unity filters, i.e. showing the sum is equivalent to:
$$\frac{(1+1)^n+(1+\omega)^n+(1+\omega^2)^n}{3}$$
where $\omega$ is a primitive 3rd root of unity.
Using the fact that $1+\omega+\omega^2=0$, we can show that this is equivalent to
$$\frac{2^n+(-\omega^2)^n+(-\omega)^n}{3}$$
Depending on whether $n$ is even or odd, we get that this sum is equal to either $\frac{2^n-1}{3}$ or $\frac{2^n+1}{3}$
Can we use the same trick to evaluate the following sums?
$$\sum_{k\geq 0}\binom{n}{3k+1}, \sum_{k\geq 0}\binom{n}{3k+2}$$
Also, can this idea be generalized? 
I would appreciate any thoughts or ideas.

$$\sum \binom{n}{3k+1} = \frac{1^2 (1+1)^n + \omega^2(1+\omega)^n + \omega(1+\omega^2)^n}{3}$$
Basically, apply the same approach to $f(x)=x^2(1+x)^n$.
Similarly, taking $g(x)=x(1+x)^n$ we get:
$$\sum\binom{n}{3k+2}=\frac{1(1+1)^n + \omega(1+\omega)^n + \omega^2(1+\omega^2)^n}{3}$$
You should be able to get nice formula for these, depending on $n\bmod 3$.
