Preprint
Article

This version is not peer-reviewed.

A Proof of the Infinitude of Prime Numbers

Submitted:

21 February 2025

Posted:

25 February 2025

You are already at the latest version

Abstract
This paper presents a new proof of the infinitude of prime numbers, also known commonly as "Euclid's theorem." Grounded in fundamental Set theory, the proof uses the method of contradiction to demonstrate the absurdity of assuming the set of all prime numbers to be finite.
Keywords: 
;  ;  ;  ;  ;  ;  

1. Introduction

Among the natural numbers, there exists a prime category of numbers that are so prime that they may best be described as “prime numbers.” The defining property of such numbers is that they cannot be broken down into smaller whole parts other than 1 and themselves. It was Euclid1, who appears to have provided the earliest documented definition of prime numbers in his work as a collection of books called the “Elements,” dating back to circa 300 BCE. In Book IX of Elements, Proposition 20, Euclid proved that there are an infinite number of such prime numbers2 [2,3]. It was quite the proof that stands for such a high consequence that it is still valued in modernity [4]. From that point onward, the nonexistence of the largest prime number became evident, as evidenced by Euclid’s proof. Post-Euclid, many mathematicians have supported this proposition through their own respective proofs. Several such proofs can be found in [5,6,7,8]. In this paper, we will also give another proof of this proposition. For that, the motivation is visible when the following is assumed,
P = { the set of all prime numbers }
C = { the set of all composite numbers }
This implies, N * = P C , where N * = { n N n 2 } . However, if | P | is assumed finite, then an interesting point may have been ignored easily that N * = P C S , where S is the set of all natural numbers that are neither prime nor composite, which is contradictorily impossible as every element in that set would be greater than 1. Thus, by contradiction, it is possible to prove that the assumption of a finite set containing all prime numbers is inherently false.
If the core idea of the motivation were to be explicitly stated without any formalism, it would assume that there exists a finite number of prime numbers—say only 2 , 3 , 5 and 7, then consider the set of all natural numbers greater than or equal to 2 as follows,
2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 ,
Given the assumption that 2 , 3 , 5 , and 7 are only prime numbers, they are thereupon removed from the set as follows,
4 , 6 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 ,
Now, given that prime numbers are those numbers greater than 1 that are divisible only by 1 and themselves, it follows that every composite number is a multiple of a prime number. Therefore, every multiple of 2 , 3 , 5 , and 7 are removed from the set as follows,
11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , , 11 · 11 121 , , 11 · 13 143 , , 11 · 17 187 , , 11 · 19 209 ,
Now, this is a set of numbers that are neither prime (as the only prime numbers are assumed to be 2, 3, 5, and 7) nor composite (as they are not multiples of any assumed prime number), and all of them are greater than 1. This is a contradiction!
Having outlined the basic idea, we now give the complete proof of the infinitude of prime numbers as follows.

2. The Theorem and Its Proof

Theorem 1. 
There are infinitely many prime numbers.
Proof. 
Assume—for the sake of contradiction—that the elements in the set of all prime numbers are finite, and thus define the following sets,
N * = { N N N 2 }
P = { p 1 , p 2 , p 3 , , p k }
N * P = { N N * N P }
C = { N ( N * P ) N = n p , where , p P , n N * }
Here, N * P N * and C N * P . To show that C N * P , notice that C is the set of all natural numbers of the form n p , where n N * and p { p 1 , p 2 , p 3 , , p k } ; whereas N * P includes all natural numbers of the form n k , where n , k N * . It will now be shown in three parts that for any sufficiently large range ε N * , the total number of natural numbers of the form n k ε is greater than the total number of natural numbers of the form n p ε . By doing so, it would be concludable that | N * P | | C | , for any sufficiently large range ε N * and that the set N * P contains more elements than C , up to that range ε N * . Which would then be used to form a contradiction.
Part 1: In this part, we will calculate the total number of natural numbers in C up to a given range ε . For that, notice that C is the set of all natural numbers of the form n p , where n N * and p { p 1 , p 2 , p 3 , , p k } . Therefore, for the ith prime p i { p 1 , p 2 , , p i , , p k } , the natural numbers of the form n p i , where n N * , (that is, multiples of p i ) are as follows,
2 p i , 3 p i , 4 p i , 5 p i
Now, the number of natural numbers of the form n p i , where n N * , less than or equal to a finite given range ε N * yields,
2 p i , 3 p i , 4 p i , , c i p i ε
here, c i is the largest integer such that c i p i ε . This gives: c i ε p i . Since n 2 in all natural numbers of the form n p , therefore ( c i 1 ) represents a count for the total number of natural numbers of the form n p i less than or equal to the given range ε . Now, to count the total number of natural numbers of the general form n p less than or equal to the given range ε , the following is done.
for p 1 : 2 p 1 , 3 p 1 , 4 p 1 , , c 1 p 1 ε c 1 ε p 1 ( c 1 1 ) < c 1 ε p 1 for p 2 : 2 p 2 , 3 p 2 , 4 p 2 , , c 2 p 2 ε c 2 ε p 2 ( c 2 1 ) < c 2 ε p 2 for p 3 : 2 p 3 , 3 p 3 , 4 p 3 , , c 3 p 3 ε c 3 ε p 3 ( c 3 1 ) < c 3 ε p 3 for p m : 2 p m , 3 p m , 4 p m , , c m p m ε c m ε p m ( c m 1 ) < c m ε p m
where, p m { p 1 , p 2 , , p m , , p k } is the mth prime number such that p m < ε .
This implies that the total number of natural numbers of the form n p 1 , n p 2 , n p 3 , ⋯, n p m less than or equal to the given range ε are ( c 1 1 ) , ( c 2 1 ) , ( c 3 1 ) , , ( c m 1 ) , respectively. Summing these quantities together results in the total number of natural numbers of the general form  n p , less than or equal to ε . Let the total number be α .
Now, note that the abovementioned largest integer c i is always greater than 1, for all i { 1 , 2 , , m , , k } , due to the fact that each n in the natural number of the form n p is an element of N * (i.e., greater than 1). As a result, α = c 1 1 + c 2 1 + c 3 1 + + c m 1 > 1 , as shown below.
1 < c 1 1 + c 2 1 + c 3 1 + + c m 1 = α < c 1 + c 2 + c 3 + + c m ε p 1 + ε p 2 + ε p 3 + + ε p m = ε 1 p 1 + 1 p 2 + 1 p 3 + + 1 p m 1 < α < ε 1 p 1 + 1 p 2 + 1 p 3 + + 1 p m
where, α represents the total number of natural numbers of the form n p , where n N * and p P , less than or equal to ε N * .
Part 2: Similar to the part above, in this part, we will calculate the total number of natural numbers in N * P up to a given range ε . For that, notice that the set N * P contains all natural numbers of the form n k , where n , k N * . Therefore, for the ith natural number k i { k 1 , k 2 , , k i , } = N * , the natural numbers of the form n k i , where n N * , (that is, multiples of k i ) are as follows,
2 k i , 3 k i , 4 k i , 5 k i
Now, the total number of natural numbers of the form n k i less than or equal to a given range ε N * yields,
2 k i , 3 k i , 4 k i , , d i k i ε
here, d i is the largest integer such that d i k i ε . This gives: d i ε k i . Since n 2 in all natural numbers of the form n k , therefore ( d i 1 ) represents a count for natural numbers of the form n k i less than or equal to the given range ε . Now, to count the number of natural numbers of the general form n k less than or equal to the given range ε , the following is done.
for k 1 : 2 k 1 , 3 k 1 , 4 k 1 , , d 1 k 1 ε d 1 ε k 1 ( d 1 1 ) < d 1 ε k 1 for k 2 : 2 k 2 , 3 k 2 , 4 k 2 , , d 2 k 2 ε d 2 ε k 2 ( d 2 1 ) < d 2 ε k 2 for k 3 : 2 k 3 , 3 k 3 , 4 k 3 , , d 3 k 3 ε d 3 ε k 3 ( d 3 1 ) < d 3 ε k 3 for k j : 2 k j , 3 k j , 4 k j , , d j k j ε d j ε k j ( d j 1 ) < d j ε k j
where, k j { k 1 , k 2 , , k j , } is the jth natural number in the set N * such that k j < ε .
This implies that the total number of natural numbers of the form n k 1 , n k 2 , n k 3 , , n k j less than or equal to the given range ε are ( d 1 1 ) , ( d 2 1 ) , ( d 3 1 ) , , ( d j 1 ) , respectively. Summing these quantities together results in the total number of natural numbers of the general form n k , less than or equal to ε . Let the total number be β .
Now, note that the abovementioned largest number d i is always greater than 1, for all i { 1 , 2 , 3 , , j , } , due to the fact that each n in natural numbers of the form n k is an element of N * (i.e., greater than 1). As a result, β = d 1 1 + d 2 1 + d 3 1 + + d j 1 > 1 , as shown below.
1 < d 1 1 + d 2 1 + d 3 1 + + d j 1 = β < d 1 + d 2 + d 3 + + d j ε k 1 + ε k 2 + ε k 3 + + ε k j = ε 1 k 1 + 1 k 2 + 1 k 3 + + 1 k j 1 < β < ε 1 k 1 + 1 k 2 + 1 k 3 + + 1 k j
where, β represents the total number of natural numbers of the form n k , where n , k N * , less than or equal to ε N *
Part 3: In this part, we compare Equation (2) with (1) to show that the total number of natural numbers in the set N * P (that is, β ) up to the given range ε is greater than that of in the set C (that is, α ) up to that same range ε , provided that the given range ε is sufficiently large. That is,
1 1 < β α < ε 1 k 1 + 1 k 2 + 1 k 3 + + 1 k j ε 1 p 1 + 1 p 2 + 1 p 3 + + 1 p m 1 < β α < 1 k 1 + 1 k 2 + 1 k 3 + + 1 k j 1 p 1 + 1 p 2 + 1 p 3 + + 1 p m
Now, observe that since the set of all prime numbers P is assumed to be finite, therefore, the sum 1 p 1 + 1 p 2 + 1 p 3 + + 1 p m in the denominator of Equation (3) can never exceed the maximum sum 1 p 1 + 1 p 2 + + 1 p m + + 1 p k to diverge3 to infinity for however large range ε is considered, due to the assumption that p k = max { P } . On the other hand, since N * is considered infinite, therefore, the sum 1 k 1 + 1 k 2 + 1 k 3 + + 1 k j in the numerator of Equation (3) can diverge4 to infinity if we allow the range ε to do so. Therefore, for any sufficiently large finite range ε > ε the following condition is met,
1 p 1 + 1 p 2 + + 1 p m + + 1 p k < 1 k 1 + 1 k 2 + 1 k 3 + + 1 k j
The condition above holds for any sufficiently large ε due to the fact that the number of terms in the summations in both the numerator and denominator of Equation (3) was derived based on the given range.
This implies, for any sufficiently large finite range ε , that,
1 k 1 + 1 k 2 + 1 k 3 + + 1 k j 1 p 1 + 1 p 2 + 1 p 3 + + 1 p k = L > 1
As a result, from Equation (3), we have the following.
1 < β α < L α < β < α L α < β
Conclusion: The analysis above suggests that for any sufficiently large range ε N * , the total number of natural numbers of the form n p ε (i.e., α ) is less than that of the form n k ε (i.e., β ). In other words, the total number of natural numbers in N * P (i.e., β ) is greater than the total number of natural numbers in C (i.e., α ), up to any sufficiently large range ε N * , even though both sets have an infinite number of natural numbers when no range ε is considered.
Contradiction: Based on the conclusion above, for any sufficiently large range ε , since α < β for ε , therefore δ N * P such that δ C . Since δ C , therefore, δ n p , p P , n N * , where p , n < δ . However, if δ n p , then, p P , δ p n , where n N * . This implies that p P , p δ , and therefore—by the definition of a prime number— δ P . However, this contradicts the premise that δ N * P .
Should δ be in C for even large range ε 1 > ε , then, since α < β also for ε 1 (because α < β for ε and ε 1 > ε ), therefore δ 1 N * P such that δ 1 C and the rest follows a similar contradiction.
As a result, the argument can be repeated endlessly for every new chosen sufficiently large range ε N * , proving the infinitude of the prime numbers each time by contradiction. This completes the proof. □

References

  1. Narkiewicz, W. The Development of Prime Number Theory: From Euclid to Hardy and Littlewood; Springer: Berlin/Heidelberg, Germany, 2000. [Google Scholar]
  2. Fitzpatrick, R.; Heiberg, J. Euclid’s Elements, 2007.
  3. Euclid, Johan Ludvig Heiberg, S.T.L.H. The Thirteen Books of Euclid’s Elements; The University Press: University of Minnesota, 1908.
  4. G. H. Hardy, C.P.S. In A Mathematician’s Apology; Cambridge University Press: Cambridge, UK, 1967.
  5. Martin Aigner, G.M.Z. Proofs from THE BOOK; Springer: Berlin/Heidelberg, Germany, 2018. [Google Scholar]
  6. Dickson, L.E. History of the Theory of Numbers: Divisibility and Primality; Number v. 1; Dover Publications: Washington, DC, USA, 2005. [Google Scholar]
  7. Meštrović, R. Euclid’s theorem on the infinitude of primes: a historical survey of its proofs (300 B.C.–2022) and another new proof. arXiv 2023, arXiv:1202.3670. [Google Scholar]
  8. Ribenboim, P. The Little Book of Bigger Primes, 2013.
1
an ancient Greek mathematician, who lived in Alexandria, Egypt, circa 300 BCE.
2
it was done by showing that prime numbers are more than any assigned multitude of prime numbers. Note that, the proof was specifically for only three prime numbers. Euclid did not consider any arbitrary finite set of prime numbers, as is commonly done nowadays [1].
3
since the sum of the reciprocal of primes diverges
4
since the sum of the reciprocal of natural numbers diverges
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated