<s>[INST] what is the value of $\binom{n}{1}​+\binom{n}{4}+\binom{n}{7}​+\binom{n}{10}+\binom{n}{13}+\dots$ what is the value of $$\binom{n}{1}​+\binom{n}{4}+\binom{n}{7}​+\binom{n}{10}+\binom{n}{13}+\dots$$ in the form of number, 
cos, sin
attempts : I can calculate the value of $$\binom{n}{0}​+\binom{n}{3}+\binom{n}{6}​+\binom{n}{9}+\binom{n}{12}+\dots=\frac{1}{3}\left(2^n+2\cos \frac{n\pi}{3}\right)$$ by use primitive $3^\text{rd}$ root of the unity
but this problem i cant solve it. 
 [/INST] Binimial Series:
$$(1+x)^n=\sum_{k=0}^{n} {n \choose k} x^k~~~~(1)$$
$w^3=1, 1+w+w^2=0$, let $x=1$ in (1)
we get 
$$2^n=\sum_{k=0}^n {n \choose k}~~~(2)$$
Let $x=w$ in (1) and miltiply it by $w^2$, to get
$$w^2(1+w)^n=(-1)^n w^{2n+2}=\sum_{k=1}^{n} w^{k+2} {n \choose k}~~~~~(3)$$
Let $x=w^2$ in (1) and multiply by $w$, to get
$$w(1+w^2)^n=(-1)^n w^{n+1}=\sum_{k=0}^{n} w^{2k+1} {n \choose k}~~~~(4)$$
Now add (2), (3), (4), to get
$$\sum_{k=0}^{n} [1+w^{k+1}+w^{2k+1}] {n \choose k}=2^n+(-1)^n[w^{2n+2}+w^{n+1}]$$
Whenever $k=3m+1$, $[1+w^{k+2}+w^{2k+1}]=[1+w^3+w^3]=3$, otherwise it vanishes as $[1+w+w^2]=0$ when $k\ne 2m+1$
So we get $$\sum_{m=0}^{n} {n\choose 3m+1}= \frac{1}{3}\left(2^n+(-1)^n[w^{2n+2}+w^{n+1}\right)=\frac{1}{3}(2^n+2\cos[(n-2)\pi/3])$$
</s>