14. In the sequence $\left\{a_{n}\right\}$, $a_{1}=a_{2}=0$, and $a_{n+2}=6 a_{n+1}-9 a_{n}+8\left(n \in \mathbf{N}^{*}\right)$, find $a_{n}$ and $S_{n}$.
14. Solution: From the recursive relation, we have
$a_{n+2}-\frac{8}{1-(6-9)}=6\left(a_{n+1}-\frac{8}{1-(6-9)}\right)-9\left(a_{n}-\frac{8}{1-(6-9)}\right)$, which simplifies to $a_{n+2}-2=$ $6\left(a_{n+1}-2\right)-9\left(a_{n}-2\right)\left(n \in \mathbf{N}^{*}\right)$.
Let $b_{n}=a_{n}-2\left(n \in \mathbf{N}^{*}\right)$, then
$b_{1}=a_{1}-2=-2, b_{2}=a_{2}-2=-2, b_{n+2}=6 b_{n+1}-9 b_{n}\left(n \in \mathbf{N}^{*}\right)$.
The characteristic equation is $x^{2}=6 x-9$, solving it gives $x_{1}=x_{2}=3$.
Thus, we can let $b_{n}=(C n+D) \cdot 3^{n-1}\left(n \in \mathbf{N}^{*}\right)$.
From $b_{1}=b_{2}=-2$ we get $\left\{\begin{array}{l}C+D=-2 \\ (2 C+D) 3=-2\end{array}\right.$, solving it gives $C=\frac{4}{3}, D=-\frac{10}{3}$.
Therefore, $b_{n}=\left(\frac{4}{3} n-\frac{10}{3}\right) \cdot 3^{n-1}+2\left(n \in \mathbf{N}^{*}\right)$.
The sum of the first $n$ terms is
$$
S_{n}=\sum_{k=1}^{n} a_{k}=\sum_{k=1}^{n}\left[\left(\frac{4}{3} n-\frac{10}{3}\right) \cdot 3^{n-1}+2\right]=\frac{4}{3} \sum_{k=1}^{n} k \cdot 3^{k-1}-\frac{10}{3} \sum_{k=1}^{n} 3^{k-1}+2 n .
$$

Let $T_{n}=\sum_{k=1}^{n} k \cdot 3^{k-1}$, then
$$
T_{n}-3 T_{n}=\sum_{k=1}^{n} k \cdot 3^{k-1}-\sum_{k=1}^{n} k \cdot 3^{k}=\sum_{k=1}^{n} 3^{k-1}-n \cdot 3^{n}=\frac{3^{n}-1}{3-1}-n \cdot 3^{n}=\frac{3^{n}-1}{2}-
$$
$n \cdot 3^{n}$.
So $T_{n}=\frac{1}{2}\left[n \cdot 3^{n}-\frac{3^{n}-1}{2}\right]$.
Hence $S_{n}=\frac{4}{3} \cdot \frac{1}{2}\left[n \cdot 3^{n}-\frac{3^{n}-1}{2}\right]-\frac{10}{3} \cdot \frac{3^{n}-1}{2}+2 n=(2 n-6) \cdot 3^{n-1}+2(n+1)(n$ $\left(\mathbf{N}^{*}\right)$.