Example 2-42 Find the coefficient $a_{n}$ of $x^{n}$ in $G(x)=\frac{1}{(1-x)\left(1-x^{2}\right)\left(1-x^{3}\right)}$.
Solve $\left\{a_{n}\right\}$ whose characteristic polynomial is $(x-1)^{3}(x+1)\left(x^{2}+x+1\right)$.
$x=1$ is a triple root, $x=-1$ is a single root.
The roots of $x^{2}+x+1=0$ are $\frac{1}{2}(-1 \pm \sqrt{3} i)=\mathrm{e}^{ \pm \frac{2}{3} \pi i}$,
thus we can set
$$
a_{n}=a+b n+c\binom{n}{2}+d(-1)^{n}+e \cos \frac{2}{3} \pi n+f \sin \frac{2}{3} \pi n
$$

By long division, we get
$$
\begin{aligned}
G(x) & =\frac{1}{(1-x)\left(1-x^{2}\right)\left(1-x^{3}\right)}=\frac{1}{1-x-x^{2}+x^{4}+x^{5}-x^{6}} \\
& =1+x+2 x^{2}+3 x^{3}+4 x^{4}+5 x^{5}+7 x^{6}+8 x^{7}+10 x^{8}+\cdots
\end{aligned}
$$

We know $a_{0}=1, a_{1}=1, a_{2}=2, a_{3}=3, a_{4}=4, a_{5}=5, a_{6}=7, a_{7}=8, a_{8}=10, \cdots$, using the initial values $a_{0}$, $a_{1}, \cdots, a_{5}$ we get
$$
a_{n}=\frac{47}{72}+\frac{7}{12} n+\frac{1}{6}\binom{n}{2}+\frac{1}{8}(-1)^{n}+\frac{2}{9} \cos \frac{2}{3} n \pi
$$

Using this result to calculate $a_{6}, a_{7}, a_{8}$ yields results consistent with the long division.