[Math] Infinitely many primes of the form $3k+2$

number theoryprime numbers

Prove that there are infinitely many primes of theform $3k+2$
I tried so:
Let $$A= \left\{ p \in \mathbb{P} : \; p=3k+2 \right\}$$ Suppose, that the set $A$ is finite, i.e. $$A= \left\{ p_1 , p_2, \ldots , p_k \right\}$$ Let $$M=3 p_1 p_2, \ldots p_k+2$$ Then $M$ is of the form $3k+2$ Since $M>1$, then there exists prime $q$ such that $q\mid M$. We show that $M$ has prime divisor of the form $3k+2$. Suppose that every prime divisor of $M$ is of the form $3k+1$. Fundamental theorem of arithmetic we have that $M= q_1 q_2 \ldots q_s$ where for each $i$ $q_i$ is of the form $3k+1$. Since for each $i$ $q_i$ is of the form $3k+1$, then $$M= q_1 q_2 \ldots q_s$$ is of the form $3k+1$, contradiction because $M$ is of the form $3k+2$. Thus there exists prime $q$ of the form $$3k+2$$ and $q\mid M$. Thus there exists $i \in \left\{ 1, \ldots ,k\right\}$ such that $q=p_i$ but $q\mid M$, i.e. $p_i \mid M$, but $p_i \mid M=3 p_1 p_2, \ldots p_k+2$ and $p_i \mid 3 p_1 p_2, \ldots p_k$, contradiction. Thus $A$ is infinite. I have problem, because don't get a contradiction when $p_i=2$, but this proof is correct for primes of the form $4k-1$ and $6k-1$. Please help me.

Best Answer

Don't put the prime number $2$ in $M$. That is, if $A = \{ 2, p_2,p_3,...,p_n \}$, define $M = 3p_2p_3...p_n + 2$. Then, $ 2 \not| M$ and your argument shows that $M$ is neither in $A$ nor is divisible by any prime in $A$, a contradiction.