Find the total number of coefficients in the expansion of $(x^2-x +1)^{22}$ that are divisible by $6$. Find the total number of coefficients in the expansion of $(x^2-x +1)^{22}$ that are divisible by $6$.
So I am really stuck on this one.. I immediately defeated when I saw that I need to compute  $\binom {22} {a,b,c}$ where $a,b,c$ is the coefficients of $x^2,-x,1$. So what should be the next step I need to take? 

We provide a method for determining when a binomial coefficient is a multiple of a prime $p$.
We first prove the following:
Lemma: Let $p$ be a prime and let $m,n$ be natural numbers. Let $n = lp+t$ and $m = kp+s$, where $0 \leq t < p$ and $0 \leq s < p$. Then
\begin{align*}
\binom{n}{m} = \binom{l}{k}\binom{t}{s}\mod p 
\end{align*}
Proof: Observe first that for $0 < r < p$, $\binom{p}{r}$ is divisible by $p$. Hence in
$$ (1+X)^p - (1+X^p) = \binom{p}{1}X + \binom{p}{2}X^2+\cdots + \binom{p}{p-1}X^{p-1} $$
all the coefficients are divisible by $p$.
Now, consider
\begin{align*}
 P(X) &= (1+X)^{lp+t} - (1+X)^t (1+X^p)^{l} \\
 &= (1+X)^t\left\{(1+X)^{lp} - (1+X^p)^l \right\} \\
 &= (1+X)^t \left\{(1+X)^p - (1+X^p)\right\}\left\{(1+X)^{p(l-1)} + \cdots + (1+X^p)^{l-1}\right\}
\end{align*}
As observed before, $P(X)$ is a multiple of $p$.
Consider the coefficient of $X^{kp+s}$ in $P(X)$. This equals
\begin{align*}
 \binom{lp+t}{kp+s} - \binom{t}{s}\binom{l}{k}
\end{align*}
and hence all the coefficients are multiples of $p$. Note that this holds even when $k = 0$ or $l=0$. This completes the proof of the lemma.
Applying the Lemma repeatedly,  it follows that if
\begin{align*}
 n &= t_1+t_2p+t_3p^2+\cdots + t_rp^{r-1} \\
 m &= s_1+s_2p+s_3p^2+\cdots + s_rp^{r-1}
\end{align*}
then
\begin{equation*}
\binom{n}{m} = \binom{t_1}{s_1}\binom{t_2}{s_2}\cdots\binom{t_{r-1}}{s_{r-1}} \mod p
\end{equation*}
As observed, $x^2-x+1 = (x+1)^2 \pmod 3$ and hence we can find which binomials $\binom{44}{k}$ are multiples of 3. 
Here, $44 = 3^3 + 3^2 + 2\cdot 3 + 2 $. If $k = s_1\cdot 3^3 + s_2 \cdot 3^2 + s_3 \cdot 3 + s_4$, where $0 \leq s_i \leq 2$, $\binom{44}{k}$ is a multiple of 3 if and only if $s_2 = 2$ and note that $s_1 \neq 2$ since $k \leq 44$. This gives that for $k = 18, 19, 20, 21, 22, 23, 24, 25, 26$, $\binom{44}{k}$ is a multiple of 3. 
Of these we need to eliminate 18, 22 and 26.  We do this as follows:
Since $x^2-x+1 = x^2+x+1 \pmod 2$, we have 
$$(x^2-x+1)^{22} = \left(\frac{1-x^3}{1-x}\right)^{22} \pmod 2$$
Again, using the Lemma we obtain upto $\mod\, 2$,
$$(1-x^3)^{22} = 1 + x^6 + x^{12} + x^{18} + x^{48} + x^{54} + x^{60} + x^{66}$$
and again $mod\, 2$, $(1-x)^{-22}$ contains only even powers of $x$. Now,
we eliminate $18, 22, $ and $26$ as follows:
The coefficient of $x^{18}$ is obtained by multiplying the terms containing $(1, x^{18}), (x^6, x^{12}), (x^{12}, x^6)$ and hence the coefficient is sum of three odd numbers and hence is odd.
The coefficient of $x^{22}$ is obtained by multiplying the terms containing $(1, x^{22}), (x^6, x^{16}), (x^{18}, x^4)$ and hence the coefficient is sum of three odd numbers and hence is odd.
The coefficient of $x^{26}$ is obtained by multiplying the terms containing $(1, x^{26}), (x^6, x^{20}), (x^{12}, x^{14})$ and hence the coefficient is sum of three odd numbers and hence is odd.
Thus the only coefficients that are multiples of 6 are those of $x^n$ where $n = 19, 20, 21, 23, 24, 25$.
