13. (13 points) In the sequence $\left\{a_{n}\right\}$,
$$
a_{1}=1, a_{2}=\frac{1}{4} \text {, }
$$

and $a_{n+1}=\frac{(n-1) a_{n}}{n-a_{n}}(n=2,3, \cdots)$.
(1) Find the general term formula for the sequence $\left\{a_{n}\right\}$;
(2) Prove that for all $n \in \mathbf{Z}_{+}$, we have
$$
\sum_{k=1}^{n} a_{k}^{2}<\frac{7}{6} .
$$
13. (1) From the given, for $n \geqslant 2$ we have
$$
\begin{array}{l}
\frac{1}{a_{n+1}}=\frac{n-a_{n}}{(n-1) a_{n}}=\frac{n}{(n-1) a_{n}}-\frac{1}{n-1} \\
\Rightarrow \frac{1}{n a_{n+1}}=\frac{1}{(n-1) a_{n}}-\frac{1}{n(n-1)} \\
\Rightarrow \frac{1}{n a_{n+1}}-\frac{1}{(n-1) a_{n}}=-\left(\frac{1}{n-1}-\frac{1}{n}\right) \\
\Rightarrow \sum_{k=2}^{n-1}\left(\frac{1}{k a_{k+1}}-\frac{1}{(k-1) a_{k}}\right) \\
\quad=-\sum_{k=2}^{n-1}\left(\frac{1}{k-1}-\frac{1}{k}\right)=-\left(1-\frac{1}{n-1}\right) \\
\Rightarrow \frac{1}{(n-1) a_{n}}-\frac{1}{a_{2}}=-\left(1-\frac{1}{n-1}\right) \\
\Rightarrow \frac{1}{(n-1) a_{n}}=\frac{1}{a_{2}}-\left(1-\frac{1}{n-1}\right)=\frac{3 n-2}{n-1} \\
\Rightarrow a_{n}=\frac{1}{3 n-2} .
\end{array}
$$

Also, when $n=1$, it holds, thus,
$$
a_{n}=\frac{1}{3 n-2}\left(n \in \mathbf{Z}_{+}\right) \text {. }
$$
(2) When $k \geqslant 2$,
$$
\begin{aligned}
a_{k}^{2} & =\frac{1}{(3 k-2)^{2}} \\
& <\frac{1}{(3 k-4)(3 k-1)} \\
& =\frac{1}{3}\left(\frac{1}{3 k-4}-\frac{1}{3 k-1}\right) .
\end{aligned}
$$

Then for $n \geqslant 2$,
$$
\begin{array}{l}
\sum_{k=1}^{n} a_{k}^{2}=1+\sum_{k=2}^{n} a_{k}^{2} \\
<1+\frac{1}{3}\left(\left(\frac{1}{2}-\frac{1}{5}\right)+\left(\frac{1}{5}-\frac{1}{8}\right)+\cdots+\right. \\
\left.\left(\frac{1}{3 n-4}-\frac{1}{3 n-1}\right)\right) \\
=1+\frac{1}{3}\left(\frac{1}{2}-\frac{1}{3 n-1}\right) \\
<1+\frac{1}{6}=\frac{7}{6} .
\end{array}
$$

Also, when $n=1$, $a_{1}^{2}=1<\frac{7}{6}$, therefore, for all $n \in \mathbf{Z}_{+}$, we have $\sum_{k=1}^{n} a_{k}^{2}<\frac{7}{6}$.