Given, $\left(1+x+x^{2}+x^{3}\right)^{n}=\displaystyle \sum_{r=0}^{3 n} a_{r} x^{r}$ and $n$ is an
odd positive integer.
$\Rightarrow {\left[(1+x)\left(1+x^{2}\right)\right]^{n}=\displaystyle\sum_{r=0}^{3 n} a_{r} x^{r}}$
$\Rightarrow (1+x)^{n}\left(1+x^{2}\right)^{n}=\displaystyle\sum_{r=0}^{3 n} a_{r} x^{r}$
If we take $n=1$,
$\left(1+x+x^{2}+x^{3}\right)=\displaystyle\sum_{r=0}^{3} a_{r} x^{r}$
$=a_{0}+a_{1} x +a_{2} x^{2}+a_{3} x^{3}$
On comparing both sides,
$a_{0}=1,\, a_{1}=1,\, a_{2}=1,\, a_{3}=1$...(i)
If we take $n=3$,
$(1+x)^{3}\left(1+x^{2}\right)^{3}=\displaystyle\sum_{r=0}^{9} a_{r} x^{r}$
$\left(1+x^{3}+3 x^{2}+3 x\right)\left(1+x^{6}+3 x^{4}+3 x^{2}\right)$
$=\displaystyle\sum_{r=0}^{9} a_{r} x^{r}\left(1+x^{3}+3 x^{2}+3 x +x^{6}+x^{9}\right.$
$+3 x^{8}+3 x^{7}+3 x^{4}+3 x^{7}+9 x^{6}$
$\left.+9 x^{5}+3 x^{2}+3 x^{5}+9 x^{4}+9 x^{3}\right)$
$=\displaystyle\sum_{r=0}^{9} a_{r} x^{r}\left(1+3 x+6 x^{2}+10 x^{3}+12 x^{4}\right.$
$\left.+12 x^{5}+10 x^{6}+6 x^{7}+3 x^{8}+x^{9}\right)$
$=\displaystyle\sum_{r=0}^{9} a_{r} x^{r}$
On comparing the coefficient of $x$ on both sides;
$a_{0}=1,\, a_{1}=3,\, a_{2}=6,\, a_{3}=10,\, a_{4}=12,\, a_{5}=12$
$a_{6}=10,\, a_{7}=6,\, a_{8}=3,\, a_{9}=1$...(ii)
From E (i), we see that,
$a_{0}-a_{1}+a_{2}-a_{3}=0,$ when $n=1$
From E (ii), we see that,
$a_{0}-a_{1}+a_{2}-a_{3}+a_{4}-a_{5}+ a_{6}-a_{7} +a_{8}-a_{9}=0$
when $n=3$
Similarly, for each odd terms:
$a_{0}-a_{1}+a_{2}-a_{3}+...-a_{3 n}=0$