3

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

$1.$ $\emptyset $
$2.$ {$3$}
$3.$ All primes of the form $4k+3$
$4.$ All primes except $2$ and $5$
$5.$ All primes

This one is pretty easy to get right through the process of elimination, which is how I solved it (it's $3$). What would be a more rigorous way of solving this?

John Doe
  • 1,080
  • Fermat's little theorem tells us for every prime $p$ and integer $a$ that $a^p \equiv a \bmod p$. For all primes $p$, if $x \equiv y \bmod p$ then $x^p \equiv y^p \bmod p^2$. So from $5^p \equiv 5 \bmod p$ we get $5^{p^2} \equiv 5^p \bmod p^2$. Therefore the hypothesis of the question implies $-1 \equiv 5^p \bmod p^2$. Reducing both sides mod $p$, $-1 \equiv 5 \bmod p$, so $p$ divides 6. Hence $p$ is $2$ or $3$. But $p = 2$ is impossible since for any odd number $x$ we have $x^2 \equiv 1 \bmod 4$. You can check directly that $p = 3$ works, so the only choice is ${3}$. – KCd May 24 '15 at 23:55

2 Answers2

2

Clearly $p\neq 2$, because $5^{2^2}+1\equiv 1^{2^2}+1\equiv 2\not\equiv 0\pmod{\! 2^2}$.

$\ p\mid 5^{p^2}+1\,\Rightarrow\, p\mid 5^{2p^2}-1$ and by little Fermat $p\mid 5^{p-1}-1$.

See this lemma to get $\,p\mid 5^{(2p^2,\,p-1)}-1=5^2-1=2^3\cdot 3\,\Rightarrow\, p=3$

$5^{3^2}+1\equiv 125^3+1\equiv (-1)^3+1\equiv 0\pmod{3^2}$, so $\{3\}$ is the set of solutions.

Relevant lemma: $\,a^{p^{k}}\equiv a^{p^{k-1}}\pmod{p^k}$ (for all $k\ge 1$. see this question).

So another way of checking: $\,5^{3^2}+1\equiv 5^3+1\equiv 126\equiv 0\pmod{3^2}$.

Or like user225222 did it: $\,\color{#0b4}{5^{p^2}}\stackrel{\text{FLT}}\equiv 5^p\stackrel{\text{FLT}}\equiv 5\equiv \color{#0b4}{-1}\pmod{\! p}\,\Rightarrow\, p\mid 6$

user26486
  • 11,331
2

In the congruance holds you also have : $5^{p^2}+1\equiv 0 [\rm mod p]$.

On the other hand $5^p\equiv 5 [\rm mod p]$ ($equation : x^p \equiv x [\rm mod p]$) so we should have $5+1\equiv 0 [\rm mod p]$ (apply equation twice).

So the only possible primes are 2 or 3. 2 is not a solution and 3 is a solution indeed:

$$5^4+1 \equiv (4+1)^4+1 \equiv 2 [\rm mod 4]$$ $$5^9+1 \equiv (9-4)^{9} +1 \equiv -(4)^{9} +1 \equiv -(8)^6+1 \equiv -1(-1)^6+1 \equiv 0 [ \rm mod 9] $$.

Hence 3 is the only solution