Checking the proof of: find all primes $p$ such that $p^2\mid 5^{p^2} +1$

290 Views Asked by At

Find all primes $p$ such that $$p^2 \mid 5^{p^2} +1$$

Okay, so I got this:

$x = 5^{p^2} +1 = (5^p)^p +1$. In order to use Eulers theorem, I checked that $(5^p, p^2) = 1$, which is true when $p \ne 5$. So, because $\varphi(p^2) = p$, it follows that $(5^p)^p + 1 \equiv 1 + 1 \equiv 2\ (modp)$. So, when $p\ne5$, $x$ is not divisible by $p^2$. Easy to check that it's not divisible for $p=5$.

My textbook says that answer is $p=3$, which is true when I plug it into $x$. So what's wrong with my try ? If the whole approach is wrong, please post solution to this problem, as my textbook only gives final result.

3

There are 3 best solutions below

2
On BEST ANSWER

Clearly, $p\ne5$. Then Fermat gives $$ -1 \equiv 5^{p^2} \equiv (5^{p}){^p} \equiv 5^{p} \equiv 5 \bmod p $$ and so $p$ divides $6$. Now $p=2$ does not work but $p=3$ does work.

1
On

It is not correct since $\varphi(p^2) = p(\color{red}{p-1})$, but you can repair it easly.

All congruences are modulo $p^2$. So we have by Euler (since $p\ne 5$)

$$ 5^{p^2-p} \equiv -1 \implies 5^p\equiv 5^{p^2}\equiv -1$$

So $p\mid 5^p+1$, but by Fermat little theorem we have $p\mid 5^p-5$ so $$p\mid (5^p+1)-(5^p-5) = 6 \implies p=2\;\;{\rm or}\;\;p=3$$

Only $p=3$ works...

2
On

If $5^{p^2} + 1$ is divisible by $p^2$, it must also be divisible by $p$

Freshman's dream...

Over a finite fields:

$(a + b)^{p^n}\equiv a^{p^n} + b^{p^n} \pmod{p}$

$5^{p^2} + 1^{p^2} \equiv (5+1)^{p^2}\equiv 0 \pmod p$

$p$ divides $6$

leaving us with only 2 candidates to check.