9、(16 points) In the sequence $\left\{a_{n}\right\}$, it is known that $a_{1}=1, a_{2}=\frac{1}{4}$, and $a_{n+1}=\frac{(n-1) a_{n}}{n-a_{n}}(n=2,3, \cdots)$  
(1) Find the general term formula of the sequence $\left\{a_{n}\right\}$  
(2) Prove: For all $n \in \mathbb{N}^{*}$, $\sum_{k=1}^{n} a_{k}^{2}<\frac{7}{6}$.
(1) For $n \geq 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}=\frac{1}{(n-1) a_{n}}-\frac{1}{n-1} \Rightarrow \frac{1}{(n-1) a_{n}}-\frac{1}{n-1}=\frac{1}{a_{2}}-1 \\
\Rightarrow a_{n}=\frac{1}{3 n-2}
\end{array}
$$

The above formula also holds for $n=1$.
(8 points)
(2) When $k \geq 2$, we have $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)$.
Therefore, when $n \geq 2$, we have
$$
\begin{array}{c}
\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+\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}
$$

When $n=1$, $a_{1}^{2}=1<\frac{7}{6}$, so for all $n \in \mathbb{N}^{+}$, we have $\sum_{k=1}^{n} a_{k}^{2}<\frac{7}{6}$.
(16 points)