# Prove: There are infinitely many prime numbers.

How do we even start proving that something is infinite? For instance, how do we show that there are infinitely many prime numbers?

The premise in itself is so mind-boggling because the concept of infinity is vast and at its very core, very daunting to comprehend. However, we have an intuition that the sequence of prime numbers which starts at $2$ goes on forever without bounds.

Having an intuition that there are infinite primes is one thing, but proving it that it’s indeed true is another.

## BRAINSTORM BEFORE WRITING THE PROOF

Note: The purpose of brainstorming in writing proof is for us to understand what the theorem is trying to convey; and gather enough information to connect the dots, which will be used to bridge the hypothesis and the conclusion.

Since the focus of the proof in this lesson is about primes, it is important that we first define what a prime number is.

DEFINITION: A prime number is a positive integer that is greater than $1$, and it has exactly two factors which are $1$ and itself.

Below is another definition of a prime number, $\color{red}p$.

So the positive integer $\large1$ is not a prime number because a prime number by definition is a positive integer that is greater than $1$.

In addition, $1$ is not a composite number either because a composite number is also a positive integer which has at least one divisor other $1$ and itself. In fact, the number $1$ is neither prime nor composite.

It’s a good practice for us to gain a basic understanding on how to manually identify a prime number.

Our goal is to list the first seven prime numbers. Let’s do that by counting up starting from the number $2$ then test each number for its primality.

The first seven prime numbers

• $\large\red2$ is a prime number since it has exactly two divisors, namely $1$ and itself, $2$. In fact, it is the smallest prime number, and also the only even number that is prime.
• $\large\red3$ is a prime number because its only factors are $1$ and $3$.
• $\large4$ is NOT prime because it has another factor other than $1$ and itself. The other factor is $2$. We say that it is a composite number.
• $\large\red5$ is prime for the obvious reason that its only factors are $1$ and itself.
• $\large6$ is NOT prime because its two factors other than $1$ and itself are the prime numbers $2$ and $3$.
• $\large\red7$ is a prime number because the only two divisors are $1$ and $7$.
• $\large8$ is NOT a prime number for the same reason that it has more than two factors.
• $\large9$ is NOT a prime number because perfect squares are not primes. Notice that $9 = 3 \times 3 = {3^2}$. It clearly has a factor other than $1$ and $9$.
• $\large10$ is NOT prime because it is a product of two other prime numbers, $2 \times 5 = 10$. That means $10$ has more than two factors which are $1$, $2$, $5$, and $10$.
• $\large\red{11}$ is a prime number since its only factor pair includes $1$ and $11$; thus, $1$ & $11$.
• $\large12$ is NOT a prime number because it is an even number larger than ${2}$.
• $\large\red{13}$ is definitely prime since its only factors are $1$ and itself.
• $\large14$, $\large15$ and $\large16$ are composite numbers therefore they are not primes. I will leave it to you to verify.
• $\large\red{17}$ is a prime number since it can only be divided by $1$ and $17$.

I just hope that this little exercise of finding the first seven prime numbers by hand gives us an appreciation that finding prime numbers can be tedious. In fact, it’s extremely tedious because as prime numbers become infinitely large, their gaps also become infinitely humungous.

Suppose that we continue the process of manually finding prime numbers using the list method above.

Assume that we stumble upon the prime number $\large\red{{p_n}}$. We try our best to find the next prime number after $\large{{p_n}}$ but we fail every time. Thus, we categorically declare that there’s no more prime number after that. The end!

How can we be so sure that $\large\red{{p_n}}$ is indeed the largest prime?

Now, we are getting into the strategy of proving that there is an infinite number of prime numbers.

Firstly, trust me that there’s no way to prove it using direct proof since it is impossible to come up with a sensible hypothesis to start with, and use it as a basis to arrive at the conclusion. Hence, we are going to prove it is using the proof by contradiction.

• The original statement that we want to prove:

There are infinitely many prime numbers.

• Claim that the original statement is FALSE then assume that the opposite is TRUE. The opposite of the original statement can be written as:

There is a finite number of primes.

• Let’s see if this makes sense. Assume that there is a finite amount of prime numbers, and the only prime numbers in existence are listed below. Keep in mind that the largest prime number is $17$.

$\large{2,\,\,3,\,\,5,\,\,7,\,\,11,\,\,13,\,\,17}$

• Construct the new number $\Large{x}$ by multiplying all the prime numbers then add $\large{\red{1}}$ to the product.
• Now, what can we say about the number ${x}$ ? We know that it does not equal $1$ since $x>1$. Can ${x}$ be a prime number? The answer is a big no because we assume already that we have all the prime numbers or the most complete list of all primes namely, $\large{2,\,\,3,\,\,5,\,\,7,\,\,11,\,\,13,\,\,17}$. By elimination, it is safe to say that ${x}$ must be a composite number.
• Since the number $\Large{x}$ is a composite number (a positive integer having at least one factor other than $1$ and itself), it must be divisible by at least one of our prime numbers on the list.
• Now it’s time to check the divisibility of each prime number in our list with the value of $\large{x}$ which is $510,511$ as calculated above.

The symbol $\large\nmid$ is read as “does not divide”.

$2\,\nmid \, 510,511$ $\rightarrow$$\,2$ does not divide $510,511$

$3\,\nmid \, 510,511$ $\rightarrow$$\,3$ does not divide $510,511$

$5\,\nmid \, 510,511$ $\rightarrow$$\,5$ does not divide $510,511$

$7\,\nmid \, 510,511$ $\rightarrow$$\,7$ does not divide $510,511$

$11\,\nmid \, 510,511$ $\rightarrow$$\,11$ does not divide $510,511$

$13\,\nmid \, 510,511$ $\rightarrow$$\,13$ does not divide $510,511$

$17\,\nmid \, 510,511$ $\rightarrow$$\,17$ does not divide $510,511$

• In summary, there exists no prime number in our finite list of primes that can evenly divide the constructed number $\Large{x}$ with a value of $510,511$. Notice that there is always a remainder of $\color{red}1$.
• We have reached a contradiction because it implies that we don’t have a complete list of all the prime numbers. In addition, since $\Large{x}$ is a composite number, there exists a prime number greater than $17$, the largest prime number in the list, that can divide it evenly.
• Therefore, we say that our assumption that there is a finite number of prime numbers is false. Leading us to conclude that the original statement must be true which states that there are infinitely many prime numbers.

## WRITE THE PROOF

THEOREM: There are infinitely many prime numbers.

PROOF: Firstly, we claim that the original statement is false. Secondly, we are going to assume that the opposite is true. That is, we assume that there is a finite number of prime numbers. We say there are only $\large{n}$ prime numbers. Let’s designate them with the variable $\large{p}$ with subscripts $1$, $2$, $3$, $4$, and so on. Since the set of prime numbers is assumed to be finite, the largest prime will take the subscript of $n$. Listing them, we have ${p_1},\,\,{p_2},\,\,{p_3},\,\,{p_4},\,\, \cdot \cdot \cdot \,\,,\,\,{p_{n - 1}},\,\,{p_n}$. Now, we construct a new number $\large{x}$ by multiplying all the prime numbers then adding $\red{+1}$ to the product.

$\large{x} = {p_1} \times {p_2} \times {p_3} \times {p_3} \times \,\, \cdot \cdot \cdot \,\, \times \,\, {p_{n - 1}} \times {p_n}\color{red} + 1$

There are two possibilities of the value of $\large{x}$. It can either be a prime number or a composite number. Clearly, $x$ cannot be prime since we already assume that we have all the primes which can be written as ${p_1},\,\,{p_2},\,\,{p_3},\,\,{p_4},\,\, \cdot \cdot \cdot \,\,,\,\,{p_{n - 1}},\,\,{p_n}$. This means $x$ must be a composite number, thus at least one of the prime numbers can evenly divide it. Let’s represent all primes in the list as ${p_k}$ where ${1 \le k \le n}$. However, ${p_k}$ does not divide ${x}$ since we always get a remainder of ${1}$ when we divide ${x}$ by ${p_k}$. This is a contradiction to the assumption that we have all the prime numbers in the list which implies our list of prime numbers is incomplete. Therefore, we reject the assumption that there are finitely many prime numbers, and thus conclude the original statement must be true. We have just proved there are infinitely many prime numbers. ◾️