# There are infinitely many primes congruent to 9 mod 10

I want to show that there are infinitely many primes $p$ such that $p = 9 \pmod {10}$.

First, I can see that 19 is one of them. Assume there are finitely many, i.e., 19, $p_1, p_2 , \cdots , p_k$. Let $P = 19p_1 p_2 \cdots p_k$ and $N =4P^2 -5.$ I want to show that all prime divisors of $N$ are congruent modulo 1 or 4 mod 5 and $N=9 \pmod{10}$.

Thank you so much.

Any help will be appreciated.

• Step 1: $p=9\pmod{10}$ if and only if $p=9\pmod{2}$ and $p=9\pmod{5}$. This simplifies the problem, as all primes except 2 satisfy the first condition. Apr 19, 2016 at 4:18
• @vadim123: Please tell why all prime divisors of $N$ are congruent to 1 or 4 mod5 Apr 19, 2016 at 4:21
• math.stackexchange.com/questions/373750/… Apr 19, 2016 at 4:37

It is enough to show that there are infinitely many primes of the form $5k-1$.
Let $n\ge 2$, and let $N=5(n!)^2-1$. We first show that every prime divisor of $N$ is of the form $5k\pm 1$.
Suppose that $p$ is a prime divisor of $N$. Then $5$ is a quadratic residue of $p$. A simple Legendre symbol calculation shows that this forces $p\equiv \pm 1\pmod{5}$.
Finally, the prime divisors of $N$ cannot be all of the form $5k+1$, else their product $N$ would be, but it isn't. So $N$ has a prime divisor of the form $5k-1$.
Any prime divisor of $5(n!)^2-1$ must be greater than $n$. So we have shown that for any $n$ there is a prime of the form $5k-1$ which is greater than $n$.