6. Find all pairs of natural numbers $n$ and $k$ for which $(n+1)^{k}=$ $n!+1$. (As usual, $n!$ denotes the product of all natural numbers not exceeding $n$. For example, $4!=1 \cdot 2 \cdot 3 \cdot 4$.)
Answer: $n=k=1, n=2$ and $k=1, n=4$ and $k=2$.

Solution. If $n=1$, then $2^{k}=1!+1=2$, so $k=1$. Let $n \geqslant 2$, then the number $n!+1$ is odd and, therefore, $n+1$ is also odd. This means that $n$ is even. If $n=2$, then $3^{k}=2!+1=3$, so $k=1$. If $n=4$, then $5^{k}=4!+1=25$, so $k=2$. Now let $n \geqslant 6$. Write $n$ as $2m$, then $n!=(2m)!=(2m) \cdot (2m-1)!$. The factorial on the right side contains factors $m$ and 2, and they do not coincide since $m \geqslant 3$. Therefore, $n!$ is divisible by $2m \cdot 2 \cdot m=n^{2}$. Then $n^{2}$ must also divide the number $(n+1)^{k}-1$. Expanding the expression $(n+1)^{k}$, we get many terms in which $n$ appears at least to the second power, and an additional term $kn+1$. Thus, $(n+1)^{k}-1=\ell n^{2}+kn$ for some natural number $\ell$. Then $k$ must divide $n$ and, in particular, $k \geqslant n$. But in this case,

$(n+1)^{k}-1 \geqslant (n+1)^{n}-1=n \cdot (n+1)^{n-1}+(n+1)^{n-1}-1 > n \cdot (n+1)^{n-1} > n^{n} > n!$.

Therefore, the equality is impossible.