Problem Statement
Let $p$ be an odd prime. Is it true that the equation\[(p-1)!+a^{p-1}=p^k\]has only finitely many solutions?
Categories:
Number Theory Factorials
Progress
Erdős and Graham remark that it is probably true that in general $(p-1)!+a^{p-1}$ is rarely a power at all (although this can happen, for example $6!+2^6=28^2$).Erdős and Graham ask this allowing the case $p=2$, but this is presumably an oversight, since clearly there are infinitely many solutions to this equation when $p=2$.
Brindza and Erdős [BrEr91] proved that there are finitely many such solutions. Yu and Liu [YuLi96] showed that the only solutions are\[2!+1^2=3\]\[2!+5^2=3^3\]and\[4!+1^4=5^2.\]
Source: erdosproblems.com/405 | Last verified: January 14, 2026