Proving that there are infinitely many primes with remainder of 2 when divided by 3

I need to prove that there are infinitely many primes with remainder of 2 when divided by 3. I started out similarly to Euclid's classic proof of an infinite number of prime numbers:

Suppose there is only a finite set of prime numbers with remainder of 2 when divided by 3, then we can write their product as:

$$ P = q_1 \cdot q_2 \cdots q_r, \qquad \text {for some integer } r, = $$ $$ (3q_1+2)\cdot(3q_2+2)\cdots(3q_r+2), $$ for integers $q_r$.

This is where I am stuck. I do not know how to get to a similar contradiction as Euclid did when he considered $P$+$1$ and how the $q_i$'s could not divide $P$+$1$ since they divided $P$. (If they divided $P$+$1$ then they would divide $P$ and $1$, where dividing $1$ is the contradiction). Any ideas on how I can get to a similar contradiction?

Origin — Elementary Number Theory — Jones — p28 — Exercise 2.6


Solution 1:

Let $q_1,q_2,\dots,q_n$ be odd primes of the form $3k+2$. Consider the number $N$, where $$N=3q_1q_2\dots q_n+2.$$ It is clear that none of the $q_i$ divides $N$, and that $3$ does not divide $N$.

Since $N$ is odd and greater than $1$, it is a product of one or more odd primes. We will show that at least one of these primes is of the form $3k+2$.

The prime divisors of $N$ cannot be all of the shape $3k+1$. For the product of any number of (not necessarily distinct) primes of the form $3k+1$ is itself of the form $3k+1$. But $N$ is not of the form $3k+1$. So some prime $p$ of the form $3k+2$ divides $N$. We already saw that $p$ cannot be one of $q_,\dots,q_n$. It follows that given any collection $\{q_1,\dots,q_n\}$ of primes of the form $3k+2$, there is a prime $p$ of the same form which is not in the collection. Thus the number of primes of the form $3k+2$ cannot be finite.

Solution 2:

$3P - 1$ is either a prime itself or has at least one prime factor $q \equiv 2 \pmod 3.$ The reason for this is that the product of any number of primes that are $\equiv 1 \pmod 3$ is again $\equiv 1 \pmod 3.$ So, since $3P - 1 \equiv 2 \pmod 3,$ we know there is some $q$ as described.

Note that $$ \gcd(3P-1,P) = 1, $$ so the new $q$ cannot divide $P,$ and therefore is not equal to any of your original list of primes.

Solution 3:

Let $N > 2$ be an integer. Early on in Chapter 10 of these notes, on p120 as Theorem 121, I explain how Euclid's proof of the infinitude of primes can be very slightly modified to prove the following generalization:

There are infinitely many prime numbers $p$ such that $p$ is not of the form $kN+1$.

When $N = 3$, this means that there are infinitely primes which are either of the form $3k$ or $3k+2$. Since there is only one prime of the form $3k$, this answers your question.

(The notes go on to mention that essentially the same argument proves that for any proper subgroup $H$ of $(\mathbb{Z}/N\mathbb{Z})^{\times}$, there are infinitely many primes $p$ such that the reduction of $p$ modulo $N$ does not lie in $H$.)