TITLE: Question regarding Wilson's Theorem
QUESTION [7 upvotes]: Let $p$ be prime, and $a$ be integer. When does $(p - 1)! + 1 = p^a$ for some $a$ hold?  
For example:
$$p = 5 \implies (5 - 1)! + 1 = 25 = 5^2$$
$$p = 7 \implies (7 - 1)! + 1 = 721 = 7 \cdot 103$$
Any idea? 
Thanks,

REPLY [5 votes]: A Wilson prime is a prime number $p$ such that $p^2$ divides $(p-1)!+1$. The only known Wilson primes are 5, 13, and 563.