If $p$ is prime, for what values of $p$ is $(p-2)!-1$ a power of $p$? I know how to solve that when $p<5$ then $(p-1)!+1$ can be written as power of $p$.
Asked
Active
Viewed 1,134 times
11
ThisIsNotAnId
- 1,464
Yogesh Ghaturle
- 325
-
2$(p-1)!+1$ is a multiple of $p$, but not a power of $p$ in general. – carmichael561 Feb 18 '16 at 20:48
-
@carmichael561 I think the second sentence refers to this question: http://math.stackexchange.com/questions/287957/when-is-p-1-1-a-power-of-p. – Erick Wong Feb 18 '16 at 22:41
-
@YogeshGhaturle It seems to me like looking at this modulo $p-1$ (just like in the other question) should help. Can you supply details about what went wrong when you tried this? – Erick Wong Feb 18 '16 at 22:42
1 Answers
11
More generally: if $n\in\mathbb Z_{\ge 2}$, $k\in\mathbb Z_{\ge 0}$:
then all the solutions of $(n-2)!-1=n^k$ are $(n,k)=(4,0),(5,1)$.
Checking $n\in\{2,3,4,5\}$ gives those solutions. Let $n\ge 6$; then $k\ge 1$.
Clearly $n$ is odd; also $2<\frac{n-1}{2}\le n-2$, so $n-1\mid (n-2)!=n^k+1$.
But also $n-1\mid n^k-1=(n-1)\left(n^{k-1}+n^{k-2}+\cdots+1\right)$.
Therefore $n-1\mid \left(n^k+1\right)-\left(n^k-1\right)=2$, so $n-1\le 2$, contradiction.
user236182
- 13,489