(2) Let the sequence $\left\{a_{n}\right\}$ satisfy: $a_{1}=1, a_{2}=2$, and for any three consecutive terms $a_{n-1}, a_{n}, a_{n+1}$, we have $a_{n}=\frac{(n-1) a_{n-1}+(n+1) a_{n+1}}{2 n}$. Then the general term $a_{n}=$ $\qquad$
(2) $3-\frac{2}{n}$ Hint: From the condition, we have
$$
2 n a_{n}=(n-1) a_{n-1}+(n+1) a_{n+1},
$$

Therefore,
$$
(n+1)\left(a_{n+1}-a_{n}\right)=(n-1)\left(a_{n}-a_{n-1}\right),
$$

Thus, $\frac{a_{n+1}-a_{n}}{a_{n}-a_{n-1}}=\frac{n-1}{n+1}$, and $a_{2}-a_{1}=1$.
$$
\begin{aligned}
a_{n+1}-a_{n} & =\frac{a_{n+1}-a_{n}}{a_{n}-a_{n-1}} \cdot \frac{a_{n}-a_{n-1}}{a_{n-1}-a_{n-2}} \cdots \cdot \frac{a_{3}-a_{2}}{a_{2}-a_{1}} \cdot\left(a_{2}-a_{1}\right) \\
& =\frac{n-1}{n+1} \cdot \frac{n-2}{n} \cdot \frac{n-3}{n-1} \cdots \cdot \frac{1}{3} \cdot 1 \\
& =\frac{2}{n(n+1)} .
\end{aligned}
$$

Thus,
$$
a_{n}-a_{n-1}=\frac{2}{n(n-1)}=2\left(\frac{1}{n-1}-\frac{1}{n}\right),
$$

From this, we get
$$
\begin{aligned}
a_{n} & =\left(a_{n}-a_{n-1}\right)+\left(a_{n-1}-a_{n-2}\right)+\cdots+\left(a_{2}-a_{1}\right)+a_{1} \\
& =2\left(1-\frac{1}{n}\right)+1 \\
& =3-\frac{2}{n} .
\end{aligned}
$$