3. Given the sequence $\left\{x_{n}\right\}$ satisfies
$$
x_{1}=2,(n+1) x_{n+1}=x_{n}+n \text {. }
$$

Then the general term of the sequence $\left\{x_{n}\right\}$ is $x_{n}=$ $\qquad$ .
$\begin{array}{l}\text { 3. } 1+\frac{1}{n!} \text {. } \\ \text { From }(n+1) x_{n+1}=x_{n}+n \\ \Rightarrow x_{n+1}-1=\frac{x_{n}-1}{n+1} \\ \Rightarrow\left(x_{n+1}-1\right) \cdot(n+1)!=\left(x_{n}-1\right) \cdot n! \\ \Rightarrow\left\{\left(x_{n}-1\right) \cdot n!\right\} \text { is a constant sequence } \\ \Rightarrow\left(x_{n}-1\right) \cdot n!=1 \Rightarrow x_{n}=1+\frac{1}{n!} .\end{array}$