38.5.2 Find positive integers $n, k$ that satisfy the equation $(n+1)^{k}-1=n!$.

 untranslated text remains unchanged.
Let $p$ be a prime factor of $n+1$, then $p \leqslant n+1$. From $(n+1)^{k}=n!+1$, we know that $p \mid n!+1$. However, $n!+1$ cannot be divisible by any prime number less than $n+1$, so $n+1$ itself must be a prime number. If $n+1=2$, then $2^{k}=1+1$, hence $(n, k)=(1,1)$. If $n+1=3$, then $(n, k)=(2,1)$. If $n+1=5$, then $(n, k)=(4,2)$.

Below we prove that the equation has no other solutions. Assume $n+1$ is a prime number greater than 5, then $n=2m, m>2$ is an integer. Since $(n-1)!=(n-1)(n-2) \cdots 2 \cdot 1$ contains factors $2, m$, we have $n \mid (n-1)!$, thus $n^{2} \mid n!$. If $n!-(n+1)^{k}-1=n^{k}+k n^{k-1}+\cdots+k n$, then $n^{2} \mid k n$, which implies $n \mid k$. Therefore, $k \geqslant n$, at this point $n! \geqslant (n+1)^{n}-1 > n^{n} > n!$, a contradiction.
Therefore, the positive integer solutions $(n, k)$ of the equation are $(1,1),(2,1),(4,2)$.