Find the value of ${a_n^2}+{b_n^2}+{c_n^2}-a_nb_n-b_nc_n-c_na_n$ 
Let $$a_n=\binom{n}{0}+\binom{n}{3}+\binom{n}{6}+\cdots$$
$$b_n=\binom{n}{1}+\binom{n}{4}+\binom{n}{7}+\cdots$$
$$c_n=\binom{n}{2}+\binom{n}{5}+\binom{n}{8}+\cdots$$
Then find the value of $${a_n^2}+{b_n^2}+{c_n^2}-a_nb_n-b_nc_n-c_na_n$$

I wrote all expressions in a summation form but couldn't find a closed form.
Surprisingly, wolframaplha shows that all of $a_n,b_n$ and $c_n$ converges. And it also gives the closed form, but that is in the form of trigonometric expressions. Like for example,
$$\sum_{i=0}^{\infty}\binom{n}{3i}=\frac13\left(2\cos\left(\frac{n\pi}{3}\right)+2^n\right)$$
Till now I just knew the methods of integration, differentiation, sequences series and putting values to find sum of particular binomial coefficients. How did trigonometry come into play$?$ Also, we need to find the above asked expression and squaring these trigonometric expressions is not a good idea imo so there must be some other method.
Any help is greatly appreciated.
 A: I saw this question or a similar in this site but it is not easy to find it. With the hints in the comments:
By binomial expansion, we have
$$\begin{array}
.(1+1)^n&=&\binom{n}{0}&+\binom{n}{1}&+\binom{n}{2}&+\binom{n}{3}\cdots\\
(1+w)^n&=&\binom{n}{0}&+\binom{n}{1}w&+\binom{n}{2}w^2&+\binom{n}{3}w^3+\cdots\\
(1+w^2)^n&=&\binom{n}{0}&+\binom{n}{1}w^2&+\binom{n}{2}w^4&+\binom{n}{3}w^6+\cdots
\end{array}$$
Now, by using the identities $1+w+w^2=0$ and $w^3=1$, we can compute the linear combinations below. For example, $3a_n$ is just the sum of the equations above.
$$a_n=\frac{1}{3}\left((1+1)^n+(1+w)^n+(1+w^2)^n\right)=\frac{1}{3}\left(2^n+2\cos(\frac{n\pi}{3})\right)$$
$$b_n=\frac{1}{3}\left((1+1)^n+w^2(1+w)^n+w(1+w^2)^n\right)=\frac{1}{3}\left(2^n+2\cos(\frac{n\pi}{3}+\frac{4\pi}{3})\right)$$
$$c_n=\frac{1}{3}\left((1+1)^n+w(1+w)^n+w^2(1+w^2)^n\right)=\frac{1}{3}\left(2^n+2\cos(\frac{n\pi}{3}+\frac{2\pi}{3})\right)$$
Now you can check these by using the identities  $\cos(u+v)=\cos u\cos v-\sin u\sin v$, $\cos(\frac{2\pi}{3})=\cos(\frac{4\pi}{3})=-\frac{1}{2}$, $\sin(\frac{2\pi}{3})=-\sin(\frac{4\pi}{3})=\frac{\sqrt{3}}{2}$ or some better identities you know:
$$\cos(\frac{n\pi}{3})+\cos(\frac{n\pi}{3}+\frac{2\pi}{3})+\cos(\frac{n\pi}{3}+\frac{4\pi}{3})=0,$$
$$\cos^2(\frac{n\pi}{3})+\cos^2(\frac{n\pi}{3}+\frac{2\pi}{3})+\cos^2(\frac{n\pi}{3}+\frac{4\pi}{3})=\frac{3}{2},$$
$$\cos(\frac{n\pi}{3})\cos(\frac{n\pi}{3}+\frac{2\pi}{3})+\cos(\frac{n\pi}{3})\cos(\frac{n\pi}{3}+\frac{4\pi}{3})+\cos(\frac{n\pi}{3}+\frac{2\pi}{3})\cos(\frac{n\pi}{3}+\frac{4\pi}{3})=-\frac{3}{4}.$$
Hence, the sum is $\frac{4}{9}\left(\frac{3}{2}-\left(-\frac{3}{4}\right)\right)=1.$
This also immediately follows from achille hui's hint and these computations are not necessary:
$$x^2+y^2+z^2-(xy+yz+zx)=(x+yw+zw^2)(x+yw^2+w^4)$$
gives
$$a_n^2+b_n^2+c_n^2-(a_nb_n+a_nc_n+b_nc_n)=(a_n+b_nw+c_nw^2)(a_n+b_nw^2+c_nw^4)=(1+w)^n(1+w^2)^n=(1+w+w^2+w^3)^n=w^{3n}=1.$$
A: 
Let $$a_n=\binom{n}{0}+\binom{n}{3}+\binom{n}{6}+\cdots$$
$$b_n=\binom{n}{1}+\binom{n}{4}+\binom{n}{7}+\cdots$$
$$c_n=\binom{n}{2}+\binom{n}{5}+\binom{n}{8}+\cdots$$
Then find the value of $${a_n^2}+{b_n^2}+{c_n^2}-a_nb_n-b_nc_n-c_na_n$$

Here is one simple solution using induction. First,
for convenience, define
$$ S_n := {a_n^2}+{b_n^2}+{c_n^2}-a_nb_n-b_nc_n-c_na_n.$$
Next, use the well known binomial coefficient identity
$$ \binom{n}{k} + \binom{n}{k+1} = \binom{n+1}{k+1} $$
and notice that if
$$(a_n, b_n, c_n) = (x, y, z), \text{ then}\\
(a_{n+1}, b_{n+1}, c_{n+1}) = (z+x, x+y, y+z).$$
For example,
$$ b_{n+1} = \sum_k \binom{n+1}{3k+1} =
 \sum_k \binom{n}{3k} + \binom{n}{3k+1} =
 a_n + b_n = x + y. $$
Next, use the definition of $S_n$ to get
$$ S_{n+1} = \sum_{cyc} (x+y)^2 - (x+y)(y+z) = \\
\sum_{cyc} x^2+y^2+2xy-x^2-xy-xz-yz = \\
\sum_{cyc} x^2 - xy = S_n $$
where $\sum_{cyc}$ indicates a cyclic sum. That is, $$\sum_{cyc} f(x,y,z) := f(x,y,z)+f(y,z,x)+f(z,x,y).$$
For example,
$ \sum_{cyc} x^2+y^2-x^2 = \sum_{cyc} x^2 = x^2+y^2+z^2. $
Since $ S_{n+1} = S_n $ is true for all $n$, then by
induction, this implies that $S_n$ is a constant value.
Now, notice $S_0 = 1$ which implies for all $n$, $S_n=1$.
Note that a big advantage of this method is we don't need
to find the actual values of $(a_n,b_n,c_n)$ in a closed
form or otherwise. Only a little algebra is used here.
