-1

How could I find an arbitray large prime number equal to 3k+2?

Connor
  • 2,023

1 Answers1

4

Dirichlet's theorem on arithmetic progressions states that there are infinitely many primes of the form $a\pmod b$, where $\gcd(a,b) = 1$.


Pick all odd primes of the form $3k+2$ you have in your kitty, say $p_1,p_2,\ldots,p_n$. Now look at the number $$M = 3p_1p_2\ldots p_n + 2$$ Look at the prime factorization of $M$. Clearly, the prime factorization of $M$ doesn't contain $3$. Further, if all the primes in its factorization were of the form $1\pmod3$, then the product of these primes would again yield a number of the form $1\pmod3$. Hence, there has to be a prime of the form $2\pmod3$. However, $\gcd(M,p_i) = 1$ for all $i \in \{1,2,\ldots,n\}$, since all $p_i$'s are odd. Hence, there has to be another prime of the form $2\pmod3$, which doesn't match with any of $p_1,p_2,\ldots,p_n$.


The above procedure gives a way to explicitly construct these primes.

For example, say the only odd prime of the form $2\pmod3$ you knew is $5$. Then consider $M=3\cdot 5 +2 = 17$, which again is a prime.

Now that you have two primes $5$ and $17$. Consider $M = 3 \cdot 5 \cdot 17 + 2 = 257$, which again happens to be a prime.

Now we have three primes $5,17$ and $257$. Consider $M = 3 \cdot 5 \cdot 17 \cdot 257 + 2 = 65537$, which again happens to be a prime.

Now we have four primes $5,17,257$ and $65537$. Consider $M = 3 \cdot 5 \cdot 17 \cdot 257 \cdot 65537 + 2 = 4294967297$, which factorizes as $641 \times 6700417$. Note that $641 \equiv 2 \pmod3$.

Now we have five primes $5,17,257,641$ and $65537$. Consider $M = 3 \cdot 5 \cdot 17 \cdot 257 \cdot 641 \cdot 65537 + 2$ and so on...

user26486
  • 11,331
Adhvaitha
  • 20,259