12. 设数列 $\left\{a_{n}\right\}$ 的前 $n$ 项和为 $S_{n}, n \in \mathrm{N}^{*}$. 已知 $a_{1}=1, a_{2}=\frac{3}{2}, a_{3}=\frac{5}{4}$, 且当 $n \geq 2$ 时, $4 S_{n+2}+5 S_{n}=8 S_{n+1}$ $+S_{n-1}$.

(1)求 $a_{4}$ 的值;

(2)证明: $\left\{a_{n+1}-\frac{1}{2} a_{n}\right\}$ 为等比数列;

(3)求数列 $\left\{a_{n}\right\}$ 的通项公式.
(1)解: 当 $n=2$ 时, $4 S_{4}+5 S_{2}=8 S_{3}+S_{1}$,

即 $4\left(a_{1}+a_{2}+a_{3}+a_{4}\right)+5\left(a_{1}+a_{2}\right)=8\left(a_{1}+a_{2}+a_{3}\right)+a_{1}$, 整理得 $a_{4}=\frac{4 a_{3}-a_{2}}{4}$,

又 $a_{2}=\frac{3}{2}, a_{3}=\frac{5}{4}$, 所以 $a_{4}=\frac{7}{8}$.

(2)证明：当 $n \geq 2$ 时，有 $4 S_{n+2}+5 S_{n}=8 S_{n+1}+S_{n-1}$,

即 $4 S_{n+2}+4 S_{n}+S_{n}=4 S_{n+1}+4 S_{n+1}+S_{n-1}$,

$\therefore 4\left(S_{n+2}-S_{n+1}\right)=4\left(S_{n+1}-S_{n}\right)-\left(S_{n}-S_{n-1}\right)$, 即 $a_{n+2}=a_{n+1}-\frac{1}{4} a_{n}(n \geq 2)$.

经检验, 当 $n=1$ 时, 上式成立.

$\because \frac{a_{n+2}-\frac{1}{2} a_{n+1}}{a_{n+1}-\frac{1}{2} a_{n}}=\frac{\left(a_{n+1}-\frac{1}{4} a_{n}\right)-\frac{1}{2} a_{n+1}}{a_{n+1}-\frac{1}{2} a_{n}}=\frac{\frac{1}{2}\left(a_{n+1}-\frac{1}{2} a_{n}\right)}{a_{n+1}-\frac{1}{2} a_{n}}=\frac{1}{2}$ 为常数, 且 $a_{2}-\frac{1}{2} a_{1}=1$,

$\therefore$ 数列 $\left\{a_{n+1}-\frac{1}{2} a_{n}\right\}$ 是以 1 为首项, $\frac{1}{2}$ 为公比的等比数列.

(3)解: 由(2)知, $a_{n+1}-\frac{1}{2} a_{n}=\frac{1}{2^{n-1}}\left(n \in \mathrm{N}^{*}\right)$,

等式两边同乘 $2^{n}$, 得 $2^{n} a_{n+1}-2^{n-1} a_{n}=2\left(n \in \mathrm{N}^{*}\right)$.

又 $2^{0} a_{1}=1, \therefore$ 数列 $\left\{2^{n-1} a_{n}\right\}$ 是以 1 为首项, 2 为公差的等差数列.

$\therefore 2^{n-1} a_{n}=2 n-1$, 即 $a_{n}=\frac{2 n-1}{2^{n-1}}\left(n \in \mathrm{N}^{*}\right)$.

则数列 $\left\{a_{n}\right\}$ 的通项公式为 $a_{n}=\frac{2 n-1}{2^{n-1}}\left(n \in \mathrm{N}^{*}\right)$.