TITLE: Is there any prime $p$ such that $(p-1)!+1=p^m$
QUESTION [11 upvotes]: According to Wilson Theorem, we know that 
$$p\mid(p-1)!+1$$
for $p\in\mathbb{P}$. Also, we have  

$(2-1)!+1=2^1\\
(3-1)!+1=3^1\\
(5-1)!+1=5^2$  

I guess there is no such prime $p$ satisfying $(p-1)!+1=p^m$ besides $2,3,5$. But I have no idea to prove it. Could anyone give me a hand?

REPLY [7 votes]: If we eliminate $(p-1)$ from both sides of $(p-1)! = (p-1)(1 + p + p^2 ..+p^{m-1})$. we get $(p-2)! =(1 + p + p^2 ..+p^{m-1})$ . Now if $p > 5$, then $LHS = 0 \mod (p-1)$ as $p-1 = 2 * \frac{p-1}{2}$ while $RHS = m \mod (p-1)$. This says that $p-1$ divides $m$. But $p^{p-1} >>(p-1)!$ for large $p$, thus they cant differ by 1