# Prove that there are infinitely many primes of the form $25m+7$.

Suppose there are only finitely many primes of the form $25m+7$. Let $p_1,\ldots, p_r$ be such primes and let $M = (5p_1\ldots p_r)^2 + 7$. Then $N$ has form $25m + 7$, and is not divisible by any $p_i$. Let $p$ be any prime dividing $M$. Then $(5p_1\ldots p_r)^2 \equiv -7 \mod{p}$, but this means that the number $−7$ is a square$\mod p$,which is only possible if $p \equiv 7 \mod 25$. This contradicts the fact that no $p_i$ divides $M$. Therefore there must be infinitely of that form.

Does this prove my claim? I was following a layout of a proof for primes of the from $4n+1$, and tried to modify it.

Update: the claim that $-7$ is a square $\mod p$,whenever $p\equiv 7 \mod 25$ does not hold so some other claim is needed

• "which is only possible if $p\equiv 7 \pmod{25}$" -- why is this true? Mar 14, 2018 at 17:50
• e.g. $2^2\equiv -7\pmod{11}$, but $11$ is not congruent to $7$, modulo $25$. Mar 14, 2018 at 17:51
• $-7$ is a square modulo $11$. Mar 14, 2018 at 17:52
• Actually, I mentioned that I was following a layout of another proof - so I am not sure about the answer Mar 14, 2018 at 17:55
• Again, it would be a major step towards what you want. If a given problem is too hard it is a very good idea to weaken the question slightly and see if you can prove that. Standard practice. To me, the $5n+2$ case already looks hard. Just saying "I want to find a trick" isn't a sensible way to proceed.
– lulu
Mar 17, 2018 at 12:10

## 1 Answer

The logical structure of your proof is fine, but there is one huge claim that you have stated without proof:

the number $−7$ is a square$\mod p$, which is only possible if $p \equiv 7 \mod 25$.

This claim is in fact not true. For instance, $-7$ is a square mod $2$, or mod $11$, even though $2$ and $11$ are not $7$ mod $25$. More generally, by quadratic reciprocity, if $p\neq 2,7$ is a prime, then $-7$ is a square mod $p$ iff $p$ is a square mod $7$; that is, iff $p$ is $1,2,$ or $4$ mod $7$.

• I understand. I followed another proof and I see it does not makes sense. Do you have any idea how to fix this? Mar 14, 2018 at 19:59