3. Given a sequence of positive terms $\left\{a_{n}\right\}$ with the first term being 1, and for all positive integers $n$, we have
$$
a_{n}\left(n a_{n}-a_{n+1}\right)=(n+1) a_{n+1}^{2} \text {. }
$$

Then $a_{n}=$ $\qquad$ .
3. $\frac{1}{n}$.

The given equation can be transformed into
$$
\left.\left(a_{n+1}+a_{n}\right)\left[(n+1) a_{n+1}-n a_{n}\right)\right]=0 \text {. }
$$

Since $a_{n+1}+a_{n} \neq 0$, we have
$$
\begin{array}{l}
(n+1) a_{n+1}=n a_{n}=\cdots=a_{1}=1 \\
\Rightarrow a_{n}=\frac{1}{n} .
\end{array}
$$