What are the pairs of natural integers $(n, p)$, such that $(p-1)!+1=p^{n}$?
According to the previous exercise, $p$ must be prime. If $p=2$ or 3, only $n=1$ works. If $p=5$, the only possibility is $n=2$.

Otherwise, $\frac{p-1}{2} \neq 2$ is an integer, and the factors $2, \frac{p-1}{2}, p-1$ appear in $(p-1)!$. Therefore, $(p-1)^2 \mid (p-1)!$. Now, $p^n - 1 = (1 + p + p^2 + \cdots + p^{n-1})$. Thus, $p-1 \mid 1 + p + \cdots + p^{n-1}$. For all $k \geq 0, p^k \equiv 1 \pmod{p-1}$, so $1 + p + \cdots + p^{n-1} \equiv n \pmod{p-1}$. Therefore, $n$ must be a multiple of $p-1$. Since $n > 0$, we have $p^n \geq p^{p-1} \geq p \times (p-1) \times \cdots \times 2 \geq p! > (p-1)! + 1$ because $p > 5$. Thus, equality is not possible.

Therefore, the solution pairs are $(1,2), (1,3)$, and $(2,5)$.