Fermat’s Last Theorem Implies Euclid’s Infinitude of Primes

. We show that Fermat’s last theorem and a combinatorial theorem of Schur on monochromatic solutions of a + b = c implies that there exist inﬁnitely many primes. In particular, for small exponents such as n = 3 or 4 this gives a new proof of Euclid’s theorem, as in this case Fermat’s last theorem has a proof that does not use the inﬁnitude of primes. Similarly, we discuss implications of Roth’s theorem on arithmetic progressions, Hindman’s theorem, and inﬁnite Ramsey theory toward Euclid’s theorem. As a consequence we see that Euclid’s theorem is a necessary condition for many interesting (seemingly unrelated) results in mathematics.


INTRODUCTION.
Imagine that the set of positive integers has only finitely many primes. We will investigate consequences, and to become more creative with this, we imagine we live in an entirely different world, namely in a "world with only finitely many primes." If you are a number theorist, then you will realize that a major part of analytic number theory just vanishes. One of the implications of this article is that algebraic number theorists and combinatorialists would live in a very different world, too. The reason is that "Fermat's last theorem" even in the first interesting case with exponent 3 would be wrong, that major parts of the modern subject of additive combinatorics would disappear, and that even basic results of infinite Ramsey theory would not exist. If you wonder why this is the case, we invite you to a journey of unexpected discoveries in the fictional "world with only finitely many primes"! There are many proofs of Euclid's theorem stating that there exist infinitely many primes. There is a very thorough bibliographic collection of 70 pages on a multitude of proofs of Euclid's theorem, due to Meštrović [21]. Other collections are given by Ribenboim [25] and a very recent one by Granville [17]. For some recent proofs, see [27,33].
Many of these proofs make use of an infinite sequence with mutually coprime integers, such as F n = 2 2 n + 1 (Goldbach, in a letter to Euler 1730), or primitive divisors of certain recursive sequences (see, e.g., [27]). Furstenberg [14] made use of a suitably defined topology to prove Euclid's theorem. A number of proofs have used the exponents of a prime factorization; see, for example, [10,11,22]. Even more recently, two proofs [1,18] made use of van der Waerden's theorem applied to the patterns of exponents. Alpoge [1] introduced van der Waerden's theorem to this subject, and Granville [18] combined Alpoge's idea with a theorem of Fermat, namely that there are no four squares in arithmetic progression.
Inspired by this new type of proof, we investigate which type of purely combinatorial results can be combined with some kind of arithmetic result to give new proofs that there exist infinitely many primes. In this way we link Euclid's theorem to some very beautiful and significant results of modern mathematics.
Here is a brief outline of the article. In Section 2 we link Euclid's theorem to Fermat's last theorem, eventually proved by Wiles [32], and to a theorem of Schur (1916), which is often considered to be the starting point of combinatorial number theory. In Section 3 the link is to a theorem of Roth (1953) on the density of integers without arithmetic progressions. An independent elementary proof of Euclid's theorem is a by-product, in Section 4. Section 5 has some discussion about varying the numbertheoretic or combinatorial input. Section 6 uses a theorem of Hindman (1974) on an infinite extension of Schur's theorem, and Section 7 gives two proofs using infinite Ramsey theory.
Roth's theorem and its extension by Szemerédi [30], and quantitative versions thereof, (e.g., due to Bourgain [3], Gowers [15], Green and Tao [19]) has inspired many excellent mathematicians and has had tremendous impact on the relatively young field of additive combinatorics.
2. FERMAT'S LAST THEOREM IMPLIES EUCLID'S THEOREM. We first state Schur's theorem and then the main result of this article.
Lemma 1 (Schur's theorem [28], 1916). For every positive integer t, there exists an integer s t such that if one colors each integer m ∈ [1, s t ] using one of t distinct colors, then there is a monochromatic solution of Theorem 1. For n ≥ 3 let FLT(n) denote the statement "There are no solutions of the equation x n + y n = z n in positive integers x, y, z." Then "FLT(n) is true" and Schur's theorem imply that there exist infinitely many primes.
Theorem 1 gives a new proof of Euclid's theorem for those exponents for which a proof of FLT(n) independent of the infinitude of primes exists. This is certainly the case for n = 3, 4, 5, where elementary proofs exist (see [9,24]). It then trivially follows for infinitely many exponents, for example for all multiples of 3. The application of Fermat's last theorem with general n to Euclid's theorem might possibly compete for the most indirect proof, but at present the proof with general n is not actually a proof at all, as Wiles's proof makes use of the fact that there exist infinitely many primes.
We briefly show that Schur's theorem nowadays can be seen as a direct consequence of Ramsey's theorem [23] (1929). Ramsey's theorem (see [4,Theorem 10.3.1]) states that, for any number t of colors (let us call them 1, . . . , t) and positive integers n 1 , . . . , n t there exists an integer R(n 1 , . . . , n t ) such that if the edges of the complete graph on R(n 1 , . . . , n t ) vertices are colored, there exists an index i and a monochromatic clique of size n i all of whose edges are of color i. In our application we only need the case n 1 = · · · = n t = 3.
Then a, b, c all have the same color and a + b = c holds. This gives the required monochromatic solution.
Proof of Theorem 1. Suppose there exist only finitely many primes p 1 , . . . , p k (say). Every postive integer can be written as m = k i=1 p e i i . We write integers as an nth power times an nth power-free number. Hence, writing . We use n k distinct colors, denoted by (t 1 , . . . , t k ), 0 ≤ t i ≤ n − 1, and we color the integer m = k i=1 p nq i +r i i by (r 1 , . . . , r k ). By Schur's theorem there exists a monochromatic triple (a, b, c) such that c = a + b and with a fixed color (r 1 , . . . , r k ), cor- Here a, b, c all contain the same factor R and we which is a contradiction to FLT(n).
It might seem that we require unique factorization, as for an integer with distinct prime factorizations the coloring is not well-defined. However, for an application of Schur's theorem it is perfectly fine if an integer m with hypothetical distinct prime factorizations is assigned only one of the colors. (Assigning all corresponding colors to m would be an alternative, but then χ would not actually be a function.) It is of historic interest to note that Schur's motivation was to study Fermat's equation modulo primes. Dickson had proved that there is no congruence obstruction to the Fermat equation, and Schur [28] gave a simple proof of this.
3. ROTH'S THEOREM IMPLIES EUCLID'S THEOREM. The Fermat equation has also been studied with coefficients. The case x n + y n = 2z n in positive integers has attracted special attention, as a solution in distinct positive integers would mean that there exist nth powers x n < z n < y n in arithmetic progression. It was conjectured by Dénes that for n ≥ 3 there exist only trivial solutions with x = y = z. This was proved by Darmon and Merel [7] based on the methods of Wiles. Sierpiński [29] gives elementary proofs of the cases n = 4 (Chapter 2, §8) and n = 3 (Chapter 2, §14); see also [5]. We also give new proofs of Euclid's theorem in these cases.
The following result gives a matching combinatorial tool.
It should be noted that there is a purely combinatorial proof of Roth's theorem, e.g., in [16, pp. 46-49]. In contrast to van der Waerden's and Schur's theorem the above statement is a so-called "density version": this result not only guarantees monochromatic solutions in some unspecified color, but even in all those colors that occur with a positive density.
Theorem 2. For n ≥ 3 let DM(n) denote the statement "There are no three positive nth powers in arithmetic progression" or equivalently "There are no solutions of the equation x n + y n = 2z n in positive integers x < z < y." Then "DM(n) is true" and Roth's theorem imply that there exist infinitely many primes.
Proof. We first prove the following (possibly surprising) lemma.
is an upper bound. For the lower bound on the number of nth powers, we count those e i divisible by n and with p e i i ≤ N 1/k for all i = 1, . . . , k. We see that at least ⌊1 + log N nk log p 1 ⌋ · · · ⌊1 + log N nk log p k ⌋ of all integers at most N are nth powers, which gives (for large N ) a positive proportion of at least δ ≥ lower bound upper bound ≥ C (nk) k , for some C > 0.
With this lemma we can replace Schur's theorem by Roth's theorem. Roth's theorem directly guarantees that there exists a nontrivial arithmetic progression of nth powers, which is in contradiction to DM(n). (Note that in this case there is no need to divide by the factor R of the first proof.) Remark. The results by van der Waerden (used by Alpoge and Granville) and Schur or Roth (used here) are early results of Ramsey theory. The numerical bounds on s t implied by Schur's theorem are moderate, compared to the very quickly increasing bounds in van der Waerden's theorem. Let s t denote the least number such that for any t-coloring, which is a map χ : {1, . . . , s t } → {1, . . . , t}, there exist a, b, c with a + b = c and χ(a) = χ(b) = χ(c). It follows from Schur's proof that s t ≤ ⌊t!e⌋.

POSITIVE DENSITY GIVES A NEW ELEMENTARY PROOF.
The observation about "positive density" in Lemma 3 also leads to a short and new proof of Euclid's theorem: Proof. Lemma 3 says the number of nth powers (for any fixed n ≥ 2) has positive density in the set of positive integers. But it is also clear that there are at most N 1/n positive nth powers x n ≤ N , contradicting the lower bound of δN (for some fixed δ > 0) for sufficiently large N . Comparing with the bibliography [21], the proof closest in spirit appears to be Chaitin's proof [6].
We note that the main focus of this article is not about short proofs but how seemingly remote results can be applied.

DISCUSSION ON VARIANTS OF THE PROOFS ABOVE: THE FRANKL-GRAHAM-RÖDL THEOREM AND FOLKMAN'S THEOREM.
1. We now discuss that knowing something more on the combinatorial side, namely knowing about the number of monochromatic solutions, helps in reducing the number-theoretic input considerably. On the combinatorial side, Frankl, Graham, and Rödl [13] proved that with t colors the number of monochromatic solutions (a, b, c) of the equation a + b = c with a, b, c ∈ [1, N ] increases quadratically, i.e., there is a positive constant c t such that the number S(t, N ) of solutions is at least c t N 2 . (In fact, [13] gives a direct proof for the Schur equation, but also covers much more general cases.) As in the proof of Theorem 1, the monochromatic solutions of a + b = c correspond to solutions of x n + y n = z n in positive integers.
On the number-theoretic side there are several reasons why the number of solutions is smaller, giving a contradiction to the assumption "there are finitely many primes only." A result of Faltings [12] would give there are at most O(N ) solutions of x n + y n = z n with x n , y n , z n ∈ [1, N ], being coprime in pairs. A much more elementary approach is as follows: For odd n the left-hand side of x n + y n = z n can be factored as (x + y) n−1 i=0 (−1) i x n−1−i y i . In particular, when n = 3 this is x 3 + y 3 = (x + y)(x 2 − xy + y 2 ). The number of divisors of any integer z n ≤ N is clearly at most √ N . (Actually, as we assume there are at most k prime factors, this can be improved to C k (log N ) k .) Hence the number-theoretic upper bound of at most N values of z n with at most √ N factorizations each and the combinatorial lower bound of at least c t N 2 solutions contradict each other. This remark also applies in the situation of x n + y n = 2z n , as using a result of Varnavides [31] one can also prove that in this situation there would be at least c t N 2 many solutions, with x, y, z ≤ N , contradicting as before the numbertheoretic upper bound.
Proving that this is impossible could be easier than proving FLT(n), as FLT(n) corresponds to s = 2 with fewer conditions. But we are not aware of any literature on this.
6. HINDMAN'S THEOREM IMPLIES EUCLID'S THEOREM. Let us explicitly write down an extreme form of the above remark on Folkman's theorem. An extention of Folkman's theorem is Hindman's theorem [20]; see also [2] and [16, p. 85]. Proof. We start as in the proof of Theorem 1. Suppose there exist only finitely many primes p 1 , . . . , p k (say). Every integer can be written as m = (say). We color the integer m = k i=1 p nq i +r i i by (r 1 , . . . , r k ). By Hindman's theorem there exists an infinite set such that all nonempty finite subset sums are monochromatic with a fixed color (r 1 , . . . , r k ), corresponding to R = k i=1 p r i i . Dividing by R gives an infinite set such that all finite subset sums are nth powers.
This would in particular correspond to some fixed x n and infinitely many pairs (y n i , z n i ) of nth powers such that x n + y n i = z n i holds. This is clearly impossible, as the difference between consecutive nth powers z n − (z − 1) n ≥ z n−1 increases when n ≥ 2 is fixed and z increases.
Remark. The proof of Hindman's theorem is not trivial, but it is certainly much more accessible than FLT(n) for general n. Moreover, the proof of Hindman's theorem does not make use of Euclid's theorem, in contrast to Wiles's proof of FLT. In plain words, the case w = 2 of Lemma 5 says that a finite coloring of the complete graph K ∞ guarantees a complete monochromatic K ∞ as a subgraph.

Theorem 4. The infinite Ramsey theorem IRT implies Euclid's theorem.
We leave the proof of Theorem 4 as an exercise to the reader, and only remark it is a variant of the Theorem 3 and our final Theorem 5.
It turns out that one does not actually need an infinite complete monochromatic graph, but only a monochromatic complete bipartite graph K 2,∞ , where one set of the vertices consists of two elements and the other one is infinite (say countable).
We give a complete proof of this and the application to Euclid's theorem below. To prove the existence of this infinite substructure is quite simple. For ease of notation we assume that X is countable.
Proof. One can construct the required sets step by step.
Choose any set A = {a 1 , a 2 , . . . , a t+1 } ⊂ X of t + 1 distinct elements as vertices. Let v 1 = a 1 . There are infinitely many adjacent edges (v 1 , x j ). Hence one of the t colors, say color c 1 , occurs infinitely often. Let X 1 = {x 1,j : j ∈ N} ⊂ X be the set of those elements such that (v 1 , x 1,j ) are these infinitely many edges of color c 1 . Now study the color of all (a i , x 1,j ) as follows. There exists one color c 2 (say) that occurs infinitely often among the infinitely many edges (a 2 , x 1,j ). Let X 2 = {x 2,j : j ∈ N} ⊂ X 1 be those elements such that (a 2 , x 2,j ) are of color c 2 . If c 1 = c 2 we have found the required substructure with V = {a 1 , a 2 } and W = X 2 . We therefore assume that c 1 = c 2 . We iterate the step above and come to infinite subsets X t+1 ⊂ X t ⊂ · · · ⊂ X 3 ⊂ X 2 ⊂ X 1 ⊂ X such that for fixed i all edges (a i , x i,j ), j ∈ N, are of color c i (say). As there are t distinct colors only, there must be two distinct indices i 1 , i 2 ∈ {1, . . . , t + 1} such that c i 1 = c i 2 . With i 1 < i 2 without loss of generality and V = {a i 1 , a i 2 }, W = X i 2 and the lemma is proved.
An alternative is to color the elements x ∈ X\A with the vector color (c 1 , . . . , c t+1 ) if the color of the edge (a i , x) is c i , i = 1, . . . , t + 1. As there is only a finite number of vector colors, namely t t+1 , there is an infinite number of x ∈ X\A with the same vector color, which defines the set W . As before, there are two indices i 1 = i 2 such that c i 1 = c i 2 . Hence V = {a i 1 , a i 2 } and W are the sets required.
Proof. Let n ≥ 2, and assume that p 1 , . . . , p k is the list of all primes. We color the integers by the same rule as before: m = k i=1 p nq i +r i i is colored by χ(m) = (r 1 , . . . , r k ). Based on this coloring we define an infinite graph on the positive integers. The edges (m i , m j ) receive the color χ(m i + m j ).
We apply the K 2,∞ lemma to this graph: there exists a complete bipartite graph with parts V = {v 1 , v 2 } and an infinite set W such that all edges (v i , w j ), with i ∈ {1, 2} and j ∈ N, have the same color (r 1 , . . . , r k ).
We multiply all integers in N by the constant P = k i=1 p n−r i i . All pairwise sums P v i + P w j = P (v i + w j ) are an nth power z n i,j (say). Note that z n 2,j − z n 1,j = P (v 2 − v 1 ) is a constant, and is also the distance between infinitely many distinct pairs of nth powers, for the infinitely many values j. This is impossible, as the gap between consecutive nth powers increases (see above).
With Hindman's theorem we made use of a quite advanced combinatorial result, and the number-theoretic part became correspondingly quite simple. We then reduced the depth of the combinatorial lemma until we reached the K 2,∞ lemma. On the numbertheoretic side, we eventually used the elementary fact that the gaps between consecutive nth powers increase and simple arithmetic such as P (m i + m j ) = P m i + P m j .
8. CONCLUSION. As our journey through a fictional world comes to an end, let us briefly reflect: a common theme in all variants discussed is that the existence of only finitely many primes would guarantee patterns for the set of nth powers that cannot actually exist, sometimes for deep reasons, sometimes for obvious ones, depending on the strength of the pattern. Summarizing the results we find: Corollary 1. In the "world with only finitely many primes" the following hold: