13. Given the sequence $\left\{a_{n}\right\}$ satisfies $a_{1} 、 a_{2}+1 、 a_{3}$ forming an arithmetic sequence, and for any positive integer $n$, we have
$$
S_{n}=\frac{1}{2} a_{n+1}-2^{n}+\frac{3}{2},
$$

where $S_{n}$ is the sum of the first $n$ terms of the sequence $\left\{a_{n}\right\}$. Find
(1) the values of $a_{1} 、 a_{2} 、 a_{3}$;
(2) the general term formula of the sequence $\left\{a_{n}\right\}$.
Three, 13. (1) From $a_{1} 、 a_{2}+1 、 a_{3}$ forming an arithmetic sequence, we know
$$
2\left(a_{2}+1\right)=a_{1}+a_{3} \text {. }
$$

For $S_{n}=\frac{1}{2} a_{n+1}-2^{n}+\frac{3}{2}$, taking $n=1,2$ respectively gives
$$
a_{1}=\frac{1}{2} a_{2}-2+\frac{3}{2} \text {, }
$$
$$
a_{1}+a_{2}=\frac{1}{2} a_{3}-4+\frac{3}{2} \text {. }
$$

Solving equations (1), (2), and (3) simultaneously, we get
$$
a_{1}=-1, a_{2}=-1, a_{3}=1 \text {. }
$$
(2) For $n \geqslant 2$, from
$$
\begin{array}{l}
S_{n}=\frac{1}{2} a_{n+1}-2^{n}+\frac{3}{2}, \\
S_{n-1}=\frac{1}{2} a_{n}-2^{n-1}+\frac{3}{2},
\end{array}
$$

we know $a_{n}=\frac{1}{2} a_{n+1}-\frac{1}{2} a_{n}-2^{n-1}$
$$
\begin{array}{l}
\Rightarrow a_{n+1}=3 a_{n}+2^{n} \\
\Rightarrow a_{n+1}+2^{n+1}=3\left(a_{n}+2^{n}\right) .
\end{array}
$$

Thus, for $n \geqslant 2$, we have
$$
\begin{array}{l}
a_{n}+2^{n}=3^{n-2}\left(a_{2}+2^{2}\right) \\
\Rightarrow a_{n}=3^{n-1}-2^{n}(n \geqslant 2) .
\end{array}
$$

Also, $a_{1}=-1$ satisfies $a_{n}=3^{n-1}-2^{n}$. Therefore, the general term formula for the sequence $\left\{a_{n}\right\}$ is
$$
a_{n}=3^{n-1}-2^{n}
$$