6. Find all pairs of positive integers $(m, n)$ such that
$$
n^{n}+n=m!\text {. }
$$
6. (Method 1) It is easy to verify that when $m=1$, the equation has no solution; when $m=2$, $n=1$ satisfies the equation; when $m=3$, $n=2$ satisfies the equation; when $m=4$, the equation has no solution; when $m=6$, the equation has no solution.
The following proof: When $m \geqslant 7$, the equation has no solution.
(1) If $n$ is odd. Since $n\left(n^{n-1}+1\right)=m$!, and $4 \mid m$!, then $4\left|n\left(n^{n-1}+1\right) \Rightarrow 4\right| n^{n-1}+1$. Note that $n$ is odd, assume $n=2 k+1$, then $n^{n-1}+1=(2 k+1)^{2 k}+1 \equiv 2(\bmod 4)$, which contradicts $4 \mid n^{n-1}+1$. Therefore, the equation has no solution in this case.
(2) If $n$ is even. Assume $n=2^{t} \cdot p$, where $t \geqslant 1, p$ is odd. Then we have
$$
n^{n}+n=n\left(n^{n-1}+1\right)=2^{t} \cdot p\left(\left(2^{t} \cdot p\right)^{2^{t} \cdot p-1}+1\right)=m!.
$$

Since $p\left(\left(2^{t} \cdot p\right)^{2^{t} \cdot p-1}+1\right)$ is odd, $2^{t} \| m!$.
On the other hand, assume $2^{a} \leqslant m \leqslant 2^{a+1}, a \in \mathbf{N}^{*}$, then the power of 2 in $m!$ is
$$
\begin{aligned}
t & =\left[\frac{m}{2}\right]+\left[\frac{m}{2^{2}}\right]+\left[\frac{m}{2^{3}}\right]+\cdots+\left[\frac{m}{2^{a}}\right] \\
& \geqslant 2^{a-1}+2^{a-2}+2^{a-3}+\cdots+1 \\
& =2^{a}-1 \\
& \geqslant \frac{m-1}{2} .
\end{aligned}
$$

Therefore,
$$
n=2^{t} \cdot p \geqslant 2^{t} \geqslant 2^{\frac{m-1}{2}} .
$$

Note that when $m \geqslant 7$, $\frac{m-1}{6} \geqslant 1$, according to Bernoulli's inequality,
$$
2^{\frac{m-1}{2}}=(1+7)^{\frac{m-1}{6}} \geqslant 1+7 \cdot \frac{m-1}{6}>1+(m-1)=m,
$$

Thus, $n>m$, and we know
$$
n^{n}m^{m}>\left(\frac{m+1}{2}\right)^{m} \geqslant m!
$$

This contradicts $n^{n}+n=m$!.
In summary, the solutions to the equation are $(m, n)=(2,1),(3,2)$.
(Method 2) When $n=1$, $m=2$ satisfies the equation; when $n=2$, $m=3$ satisfies the equation; when $n=3$, $m!=3^{3}+3=30$, clearly no solution.
The following proof: When $n=4$, the equation has no solution.
When $n \geqslant 4$, taking the original equation modulo $n-1$, we get
$$
m!\equiv n^{n}+n \equiv 2 \not \equiv 0 \quad(\bmod n-1),
$$

Thus, $n-1 \nmid m$!, hence $n-1>m$. Therefore, $n^{n}>m^{m}>m$!, which contradicts $n^{n}+n=m$!.
In summary, the solutions to the equation are $(m, n)=(2,1),(3,2)$.