If $$(1+x+x^2)^n = \sum_{r=0}^{2n} {a_r}{x^r}$$
Then what is the value of $$a_r - {n \choose 1}a_{r-1} + {n \choose 2}a_{r-2} - {n \choose 3}a_{r-3} +\cdots+ (-1)^r{n \choose r}a_0$$
Given:r is not a multiple of 3.
I literally have no idea where to even start in this problem .Please help , any help is appreciated .
UPDATE= I found the solution ! After thinking for about an hour and trying different methods , I found that the required value of expression ,is equal to coefficient of $x^r$ in the expansion of $(1+x+x^2)^n(1-x)^n$ OR $(1-x^3)^n$ . A generel term in $(1-x^3)^n$ is given by $$T_{m+1}={n \choose m}(-x^3)^m$$ . As $r$ is not a multiple of 3 , There is no value of $m$ such that $(x^3)^m=x^r$ , and hence the value of expression is $0$.
Consider an arbitrary power series $P(x)=\sum_{i=0}^\infty p_ix^i$. Using the notation that $\binom{n}{i}=0$ when $i>n$, we know $$(1-x)^n=\sum_{i=0}^\infty \binom{n}{i}(-1)^ix^i$$ Consider the coefficient of $x^k$ in $$(1-x)^nP(x)$$ This is a convolution of the two power series. It follows that the coefficient of $x^k$ is $$\sum_{i=0}^k \binom{n}{i}(-1)^ip_{k-i}$$
Now if $P(x)=(1+x+x^2)^n$, the desired expression is the coefficient of $x^r$ in $$(1-x)^nP(x)$$ $$(1-x^3)^n$$ $$\sum_{i=0}^\infty \binom{n}{i}x^{3n}$$ Clearly all the nonzero terms in this expansion must have powers that are divisible by $3$. Since $r$ is not a multiple of $3$, the coefficient of $x^r$ is $\boxed{0}$.