14

We have a prime $p$ and an integer $k > 0$. When does the following equation stand?

$(p-1)! + 1 = p^k $

I have obviously tried for some little numbers, and in some cases, it stands:

For $ p=2$ and $k=1, 1 + 1 = 2$.

For $ p=3$ and $k=1, 2 +1 = 3.$

For $ p=5$ and $k=2, 24 + 1 = 25.$

Any ideas, how to prove, if there are more, and if yes, what are the solutions?

Bill Dubuque
  • 272,048
Atvin
  • 3,392
  • No, it was actually a bad suggestion, that's why I deleted it. You've already stated the $p$ is prime, and Wilson theorem implies that only prime numbers can be candidates here, so it brings no additional insights. – barak manos Mar 18 '15 at 11:45
  • Okay, thanks for helping though. :) – Atvin Mar 18 '15 at 11:45
  • Nice question -- I suspect it's too hard to answer in general. Note that $p$ always divides $(p-1)! + 1$ and that no prime less than $p$ divides it. However, the number of primes less than $(p-1)!+1$ grows quadratically in $\log(p)$ whereas the number of primes less than $p$ grows linearly in $\log(p)$, so heuristically I suspect this becomes rarer and rarer as $p$ grows. – hunter Mar 18 '15 at 11:48
  • But you can combine the fact implied by Wilson theorem, and the fact that "factorial plus $1$ being square" is still an open problem (see here), in order to conclude that your question most likely falls under the same category (i.e., an open problem). – barak manos Mar 18 '15 at 11:49
  • How come that I get an open problem as homework? :D – Atvin Mar 18 '15 at 11:50
  • aha, then it's probably not an open problem. – hunter Mar 18 '15 at 11:50
  • Hmmmm, good question... Perhaps you can post it as yet another question here :) ... Just kidding, there is probably a better answer than "open problem". But you should really do a little research on when a factorial plus 1 is a perfect square (you can start with the link that I gave you on the previous comment). – barak manos Mar 18 '15 at 11:51
  • Okay, I will do it, thanks for your effort. – Atvin Mar 18 '15 at 11:52
  • 2
    If this is a homework it means there should be some way to determine it, said that, it doesn't hold for any prime between 6 and 20 so it doesn't seems to have any easy prime clasification, I would try to prove that the answer is that it just holds for $p=2,3,5$ but seems hard. – Carlos Laguillo Mar 18 '15 at 12:13
  • @AlexR No, for every prime, $k=1$ is a solution modulo $p$, but not necessarily satisfies the equation. For example for $p=13$, $12!+1 \neq 13$ – MathGod Mar 18 '15 at 12:27
  • @AlexR For $p=7,$ note $(p-1)!+1=7\cdot 103.$ (not a powe of $7$ – coffeemath Mar 18 '15 at 12:46
  • @MathGod Sorry, I misread as finding the prime power of $p$. – AlexR Mar 18 '15 at 15:09
  • I have given a proof for $k=2$ in : http://math.stackexchange.com/a/1892315/179940 – Michael Aug 15 '16 at 03:38
  • Also see https://math.stackexchange.com/questions/1315974/solving-a-little-diophantine-equationn-11-nm. – user26486 Aug 29 '17 at 19:43

1 Answers1

12

We show there cannot be any solutions for $p\gt 5$ $$(p-1)!+1 = p^k \implies (p-1)! = p^k-1 = (p-1)\sum\limits_{i=0}^{k-1}p^i$$

Cancel $p-1$ both sides and get $$(p-2)! = \sum\limits_{i=0}^{k-1}p^i$$

Notice that left hand side is divisible by $p-1$ for $p\gt 5$ $$\begin{align}0&\equiv \sum\limits_{i=0}^{k-1}p^i \pmod{p-1}\\0&\equiv \sum\limits_{i=0}^{k-1}1 \pmod{p-1}\\0&\equiv k \pmod{p-1}\\k&=t(p-1)\end{align}$$

So we need $k$ to be of form $t(p-1)$

$$(p-1)! + 1 = p^{t(p-1)}$$

Clearly this is impossible because $(p-1)! + 1 \lt p\cdot p\cdots (\text{p-1 times}) = p^{p-1}$

That proves there are no solutions for $p\gt 5$.

AgentS
  • 12,195