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.

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.$$
