The Infinitude of Primes

How many prime numbers are there? This simple question was first answered decisively over two thousand years ago. It sits at the foundation of all of number theory. The answer — infinitely many — is easy to state. But its proof introduced a style of argument that has echoed through mathematics ever since. This style combines proof by contradiction with an explicit construction. Understanding why the primes never run out forces us to confront the multiplicative structure of the integers directly. It requires nothing more than the Fundamental Theorem of Arithmetic and the definition of Primes and Composite Numbers. The result matters not because it is hard — Euclid's original argument is a handful of lines. It matters because of what it reveals and what it inspires. It shows that no finite list of primes can ever generate all the integers multiplicatively. This is the seed of the idea that the primes are an inexhaustible set of "atoms." It also opens the door to a whole family of related questions. Not just whether there are infinitely many primes, but how densely they are distributed. It raises the question of which primes exist in which arithmetic progressions. It also asks how various proof techniques — combinatorial, analytic, topological — can all be brought to bear on the same fact. The big picture is that this theorem is the prototype for an entire method. First, assume a finite set exhausts an infinite phenomenon. Then construct an object that must contain new information not accounted for by that finite set. Finally, derive a contradiction. Variants of Euclid's argument use Fermat numbers, factorials, or Euler's product formula. All of these follow this same skeleton. Yet each illuminates different aspects of the primes' structure. This article gives Euclid's proof in full rigorous detail. It also gives a second independent proof due to Euler, using the divergence of a certain infinite sum. It presents a compact combinatorial variant using Fermat numbers. It discusses exactly which hypotheses are essential. It closes by connecting this classical result to its modern descendants. These descendants appear in the study of the distribution of primes.

Key takeaways
  • There are infinitely many prime numbers; no finite list of primes can contain them all.
  • Euclid's proof: given any finite set of primes, multiply them and add 1 to produce a number with a prime factor outside the set.
  • The proof is a proof by contradiction built on the Fundamental Theorem of Arithmetic, which guarantees every integer greater than 1 has a prime factor.
  • Euler gave an independent, stronger proof via the divergence of ∑1/p\sum 1/p, foreshadowing analytic number theory.
  • A slick variant uses the pairwise coprimality of Fermat numbers Fn=22n+1F_n = 2^{2^n}+1 to generate infinitely many distinct prime factors.
  • Key idea: any hypothetical finite complete list of primes can be used to construct a number whose prime factors are provably new, a contradiction.

Where this lives today

The infinitude of primes is the entry point to the entire subject of the distribution of primes, foreshadowed by Euler's divergence proof above and developed fully in the study of Elementary Distribution of Primes, including the Prime Number Theorem and the Riemann Hypothesis. In cryptography, the unbounded supply of primes is what guarantees that RSA and other public-key systems always have fresh large primes available to construct keys of arbitrary security level — without infinitude, key sizes would eventually be forced to reuse primes, undermining security assumptions. In algebra, the Euclid-style "construct an object avoiding a finite obstruction set" technique reappears in proofs that there are infinitely many irreducible polynomials over a finite field, and in topological proofs of infinitude of primes (Furstenberg's 1955 proof using a topology on the integers whose open sets are unions of arithmetic progressions). In combinatorics and analytic number theory, Euler's divergence of ∑1/p\sum 1/p is the ancestor of sieve methods and of Dirichlet's theorem on primes in arithmetic progressions, which uses an analogous divergence argument for L-functions. Even in theoretical computer science, prime generation algorithms and probabilistic primality testing rely on the guaranteed unbounded density of primes to ensure termination and correctness of randomized algorithms.

Ask the tutor: Can you show me how Euclid's style of argument adapts to prove there are infinitely many primes congruent to 3  43 \bmod 4?

DefinitionPrime number and the statement of infinitude

An integer p>1p > 1 is prime if its only positive divisors are 11 and pp. An integer n>1n>1 that is not prime is composite, meaning n=abn = ab for some integers a,ba,b with 1<a,b<n1 < a,b < n. The claim under discussion, the infinitude of primes, is the statement: > For every positive integer NN, there exists a prime p>Np > N. Equivalently, the set of primes

P={2,3,5,7,11,13,… }\mathbb{P} = \{2, 3, 5, 7, 11, 13, \dots\}

is an infinite subset of N\mathbb{N}. Equivalently again: no finite list p1,p2,…,pkp_1, p_2, \dots, p_k of primes exhausts all primes — for any such list there is a prime not among them.

Intuition

The heart of the matter is a tension between addition and multiplication. Multiplicatively, the primes are the building blocks: by the Fundamental Theorem of Arithmetic, every integer greater than 11 factors uniquely into primes. If there were only finitely many primes p1,…,pkp_1,\dots,p_k, then every positive integer would be built from this fixed finite palette. Euclid's insight is to use addition to break out of this closed multiplicative world: take the product P=p1p2⋯pkP = p_1 p_2 \cdots p_k and shift it by 11. The number P+1P+1 is not divisible by any pip_i, because dividing it by any pip_i leaves remainder 11. Yet P+1>1P+1 > 1, so it must have some prime factor. That prime factor cannot be on our list — a genuinely new atom has appeared. Picture the primes as marks on a number line that "generate" all other integers by multiplication. A finite set of generators can only reach numbers built from them; the number P+1P+1 deliberately steps just outside every one of their multiplicative shadows, forcing the existence of an unaccounted-for prime.

Figure
Why P+1P+1 escapes every prime in a finite list
Example: primes 2, 3, 5 → P = 2·3·5 = 30, so P+1 = 31 multiples of 2 multiples of 3, 5 (30 = lcm) 30 = P (hits every prime's grid) 31 = P+1: misses 2, 3, 5 → new prime factor 31

Central results

TheoremEuclid's Theorem on the Infinitude of Primes

There are infinitely many prime numbers. Equivalently, for every finite set of primes {p1,p2,…,pk}\{p_1, p_2, \dots, p_k\} (k≥0k \geq 0), there exists a prime qq not in this set.

Proof

We use proof by contradiction, combined with the Fundamental Theorem of Arithmetic (existence part: every integer greater than 11 has at least one prime divisor). Step 1 (Existence of a prime factor). First we record the elementary fact, itself a consequence of well-ordering, that every integer n>1n > 1 has a prime divisor. Indeed, let SS be the set of divisors of nn that are greater than 11; SS is nonempty since n∈Sn \in S. By the well-ordering principle, SS has a least element dd. We claim dd is prime. If not, d=abd = ab with 1<a,b<d1 < a, b < d; but then aa is a divisor of nn (since a∣d∣na \mid d \mid n) with 1<a<d1 < a < d, contradicting minimality of dd in SS. Hence dd is prime and d∣nd \mid n. Step 2 (Suppose finitely many primes). Suppose, for contradiction, that there are only finitely many primes in total, say exactly

p1,p2,…,pkp_1, p_2, \dots, p_k

for some k≥1k \geq 1 (the case k=0k=0, no primes at all, is immediately impossible since 22 is prime by definition, so we may assume k≥1k \geq 1). Step 3 (Construct NN). Define

N=p1p2⋯pk+1.N = p_1 p_2 \cdots p_k + 1.

Since each pi≥2p_i \geq 2, we have N≥2⋅1+1=3>1N \geq 2\cdot 1 + 1 = 3 > 1 (more precisely N≥p1+1≥3N \ge p_1+1\ge 3), so by Step 1, NN has at least one prime divisor qq. Step 4 (qq is not any pip_i). We claim q≠piq \neq p_i for every i=1,…,ki = 1, \dots, k. Suppose toward contradiction that q=piq = p_i for some ii. Since q∣Nq \mid N, we have q∣(p1p2⋯pk+1)q \mid \left(p_1 p_2 \cdots p_k + 1\right). Also q=piq = p_i clearly divides the product p1p2⋯pkp_1 p_2 \cdots p_k (it is one of the factors). Therefore qq divides the difference

N−p1p2⋯pk=1.N - p_1 p_2 \cdots p_k = 1.

But no prime divides 11, since the only divisors of 11 are 11 itself, and a prime is by definition greater than 11. This is a contradiction. Step 5 (Conclusion). Hence qq is a prime not equal to any of p1,…,pkp_1, \dots, p_k. This contradicts our assumption in Step 2 that p1,…,pkp_1,\dots,p_k is the complete list of all primes. Therefore the assumption of Step 2 is false: there cannot be only finitely many primes. Since the set of primes is not finite, and it is a subset of the positive integers, it must be (countably) infinite. ■\blacksquare (Remark on the second formulation.) The argument in fact proves the stronger, constructive statement: given any finite set of primes {p1,…,pk}\{p_1,\dots,p_k\} — not necessarily "all primes so far" — the number N=p1⋯pk+1N = p_1\cdots p_k + 1 has a prime factor outside the set. This is exactly Steps 3–4 above, without needing Step 2's contradiction framing; the contradiction form is only needed to convert "arbitrary finite set has a prime outside it" into "the set of all primes is infinite." Both formulations are equivalent and both are established by the proof above.

∎
LemmaDivergence of the reciprocal prime sum forces infinitude

Let P={p1<p2<p3<⋯ }\mathbb{P} = \{p_1 < p_2 < p_3 < \cdots\} denote the (a priori possibly finite) list of primes. Suppose there were only finitely many primes p1,…,pkp_1, \dots, p_k. Then the finite sum ∑i=1k1pi\sum_{i=1}^k \frac{1}{p_i} is of course finite. We show instead, independently of Euclid's argument, that

∑p≤x1p→∞as x→∞,\sum_{p \le x} \frac 1p \to \infty \quad \text{as } x \to \infty,

which is only possible if there are infinitely many primes.

Proof

This is Euler's proof, using analytic estimates and the Fundamental Theorem of Arithmetic; it is logically independent of Euclid's combinatorial argument and gives a quantitatively stronger conclusion. Step 1 (Euler product, finite truncation). Fix x≥2x \ge 2 and let p1<p2<⋯<pkp_1 < p_2 < \cdots < p_k be all the primes ≤x\le x (there are only finitely many integers ≤x\le x, hence finitely many primes ≤x\le x, regardless of whether P\mathbb P itself is finite or infinite). For each prime pip_i and any integer m≥1m \ge 1,

11−1/pi=∑j=0∞1pij,\frac{1}{1 - 1/p_i} = \sum_{j=0}^{\infty} \frac{1}{p_i^j},

a convergent geometric series since 1/pi<11/p_i < 1. Consider the finite product

∏i=1k11−1/pi=∏i=1k(∑j=0∞1pij).\prod_{i=1}^{k} \frac{1}{1 - 1/p_i} = \prod_{i=1}^k \left(\sum_{j=0}^\infty \frac{1}{p_i^{j}}\right).

Expanding this product of absolutely convergent series, every term is of the form 1p1a1p2a2⋯pkak\frac{1}{p_1^{a_1} p_2^{a_2}\cdots p_k^{a_k}} for nonnegative integers a1,…,aka_1,\dots,a_k. By the Fundamental Theorem of Arithmetic (uniqueness of factorization), as (a1,…,ak)(a_1,\dots,a_k) ranges over all nonnegative integer tuples, the numbers n=p1a1⋯pkakn = p_1^{a_1}\cdots p_k^{a_k} range over exactly the set of positive integers whose prime factors all lie among p1,…,pkp_1,\dots,p_k — each such nn arising from exactly one tuple. In particular, every integer nn with 1≤n≤x1 \le n \le x has all its prime factors ≤x\le x (since any prime factor of nn is at most n≤xn \le x), hence all its prime factors among p1,…,pkp_1,\dots,p_k. Therefore

∏i=1k11−1/pi=∑n≥1p∣n⇒p≤x1n  ≥  ∑n=1⌊x⌋1n.\prod_{i=1}^{k} \frac{1}{1-1/p_i} = \sum_{\substack{n \ge 1 \\ p\mid n \Rightarrow p \le x}} \frac{1}{n} \;\ge\; \sum_{n=1}^{\lfloor x \rfloor} \frac 1n.

Step 2 (Harmonic series diverges). The harmonic series ∑n=1M1/n\sum_{n=1}^{M} 1/n diverges as M→∞M \to \infty; concretely, grouping terms in blocks of doubling length,

∑n=12r1n≥1+r⋅12,\sum_{n=1}^{2^r} \frac1n \ge 1 + r\cdot\frac12,

which is unbounded as r→∞r \to \infty (each block 12s+1+⋯+12s+1\frac{1}{2^{s}+1} + \cdots + \frac{1}{2^{s+1}} has 2s2^s terms each ≥1/2s+1\ge 1/2^{s+1}, summing to ≥1/2\ge 1/2). Hence the right side of Step 1's inequality tends to ∞\infty as x→∞x \to \infty, so

∏p≤x11−1/p→∞(x→∞).\prod_{p \le x} \frac{1}{1-1/p} \to \infty \quad (x \to \infty).

Step 3 (From the product to the sum of reciprocals). Using log⁡(1−t)−1=t+t2/2+t3/3+⋯≤t+t2\log(1-t)^{-1} = t + t^2/2 + t^3/3+\cdots \le t + t^2 for 0≤t≤1/20 \le t \le 1/2 (valid since p≥2⇒t=1/p≤1/2p\ge 2 \Rightarrow t = 1/p \le 1/2, and the tail ∑j≥2tj/j≤∑j≥2tj=t2/(1−t)≤t2\sum_{j\ge 2} t^j/j \le \sum_{j\ge2} t^j = t^2/(1-t) \le t^2 when t≤1/2t\le 1/2), we get for each prime p≤xp \le x:

log⁡11−1/p≤1p+1p2.\log\frac{1}{1-1/p} \le \frac1p + \frac{1}{p^2}.

Summing over primes p≤xp \le x and taking logarithms of Step 2's divergent product,

∑p≤xlog⁡11−1/p  →  ∞,\sum_{p \le x} \log\frac{1}{1-1/p} \;\to\; \infty,

while ∑p1p2≤∑n=2∞1n2<∞\sum_{p} \frac{1}{p^2} \le \sum_{n=2}^\infty \frac{1}{n^2} < \infty converges (comparison to a convergent pp-series-type bound), contributing a bounded amount. Therefore

∑p≤x1p  →  ∞as x→∞.\sum_{p \le x} \frac1p \;\to\; \infty \quad \text{as } x \to \infty.

Step 4 (Conclusion). If there were only finitely many primes in total, the sum ∑p≤x1/p\sum_{p\le x} 1/p would be bounded above (by the finite total sum ∑all p1/p\sum_{\text{all } p} 1/p) for all xx, contradicting Step 3's divergence. Hence there are infinitely many primes. ■\blacksquare

∎
CorollaryFermat number variant

The numbers Fn=22n+1F_n = 2^{2^n} + 1 for n=0,1,2,…n = 0, 1, 2, \dots are pairwise coprime, and consequently there are infinitely many primes.

Proof

This is a combinatorial variant, due essentially to Goldbach, using a telescoping identity rather than a direct contradiction. Step 1 (Telescoping identity). We claim that for all n≥1n \ge 1,

F0F1⋯Fn−1=Fn−2.F_0 F_1 \cdots F_{n-1} = F_n - 2.

We prove this by induction on nn. Base case n=1n=1: F0=220+1=3F_0 = 2^{2^0}+1 = 3, and F1−2=(221+1)−2=5−2=3F_1 - 2 = (2^{2^1}+1) - 2 = 5 - 2 = 3. Equal, so the base case holds. Inductive step: suppose F0F1⋯Fn−1=Fn−2F_0F_1\cdots F_{n-1} = F_n - 2 for some n≥1n \ge 1. Then

F0F1⋯Fn−1Fn=(Fn−2)Fn=Fn2−2Fn.F_0 F_1 \cdots F_{n-1} F_n = (F_n - 2)F_n = F_n^2 - 2F_n.

Now compute Fn+1−2=22n+1−1=(22n)2−1F_{n+1} - 2 = 2^{2^{n+1}} - 1 = \left(2^{2^n}\right)^2 - 1. Writing t=22nt = 2^{2^n}, so Fn=t+1F_n = t+1, we have Fn+1−2=t2−1=(t+1)(t−1)=Fn(Fn−2)=Fn2−2FnF_{n+1} - 2 = t^2 - 1 = (t+1)(t-1) = F_n(F_n - 2) = F_n^2 - 2F_n. This matches the expression above, completing the induction. Step 2 (Pairwise coprimality). Let 0≤m<n0 \le m < n. By Step 1, Fn−2=F0F1⋯Fn−1F_n - 2 = F_0 F_1 \cdots F_{n-1}, and since m<nm < n, FmF_m appears as one of the factors on the right side, so Fm∣(Fn−2)F_m \mid (F_n - 2). Suppose dd is a common divisor of FmF_m and FnF_n; then d∣Fnd \mid F_n and d∣Fn−2d \mid F_n - 2 implies d∣(Fn−(Fn−2))=2d \mid \big(F_n - (F_n-2)\big) = 2. So d∈{1,2}d \in \{1,2\}. But every Fk=22k+1F_k = 2^{2^k}+1 is odd (as 22k2^{2^k} is even for k≥0k\ge 0, since 2k≥12^k \ge 1, and even+1=+1=odd), so 2∤Fk2 \nmid F_k. Hence d=1d = 1: gcd⁡(Fm,Fn)=1\gcd(F_m, F_n) = 1. Step 3 (Infinitude of primes). Each Fn≥F0=3>1F_n \ge F_0 = 3 > 1, so by the existence-of-prime-factor fact (Step 1 of Euclid's proof above), each FnF_n has at least one prime factor qnq_n. Since the FnF_n are pairwise coprime by Step 2, no prime can divide two different FnF_n's: if r∣Fmr \mid F_m and r∣Fnr \mid F_n with m≠nm\ne n, then r∣gcd⁡(Fm,Fn)=1r \mid \gcd(F_m,F_n)=1, impossible for a prime rr. Hence the primes q0,q1,q2,…q_0, q_1, q_2, \dots are pairwise distinct, giving an infinite sequence of distinct primes, one for each n=0,1,2,…n = 0,1,2,\dots. Therefore there are infinitely many primes. ■\blacksquare

∎

Worked examples

Example 1: Applying Euclid's construction starting from a non-initial, asymmetric finite list. Take the finite set of primes {3,11}\{3, 11\} — deliberately not "the first few primes," to test the argument on an arbitrary finite list, as the theorem requires it to work for any finite set. Form

N=3⋅11+1=34.N = 3 \cdot 11 + 1 = 34.

We must find a prime factor of NN not in {3,11}\{3, 11\}. Factor: 34=2×1734 = 2 \times 17. Both 22 and 1717 are primes, and neither is 33 nor 1111. Indeed 34≡1(mod3)34 \equiv 1 \pmod 3 and 34≡1(mod11)34 \equiv 1 \pmod{11} (check: 34=3⋅11+134 = 3\cdot11+1 and 34=11⋅3+134 = 11\cdot3+1), confirming directly that neither 33 nor 1111 divides 3434, exactly as the proof guarantees (Step 4: any prime factor qq of NN satisfies q≠3,11q \ne 3, 11 since those would force q∣1q \mid 1). This example also shows that NN itself need not be prime — here 3434 is composite — but the theorem never claims NN is prime, only that some prime factor of NN escapes the given list. This is a common misreading worth flagging explicitly. We can iterate: add 22 and 1717 to our list, getting {2,3,11,17}\{2,3,11,17\}, and repeat:

N′=2⋅3⋅11⋅17+1=1123.N' = 2\cdot 3\cdot 11\cdot 17 + 1 = 1123.

Checking divisibility: 1123/7=160.43…1123/7 = 160.43\ldots, 1123/13=86.38…1123 / 13 = 86.38\ldots, 1123/17=66.06…1123/17 = 66.06\ldots (not integer, consistent since 1717 was already excluded), 1123/23=48.8…1123/23 = 48.8\ldots, 1123/29=38.7…1123/29=38.7\ldots, 1123/31=36.2…1123/31 = 36.2\ldots, and 1123≈33.5\sqrt{1123} \approx 33.5, so it suffices to check primes up to 3333: 2,3,5,7,11,13,17,19,23,29,312,3,5,7,11,13,17,19,23,29,31. None divide 11231123 (direct check: 11231123 is odd, digit sum 77 not divisible by 3, doesn't end in 0/5, and the quotients above are non-integers), so in fact 11231123 itself is prime — a genuinely new prime, consistent with, but stronger than, what the theorem guarantees.

Example 2: The Fermat number variant computed explicitly, with a subtlety. Compute the first few Fermat numbers:

F0=21+1=3,F1=22+1=5,F2=24+1=17,F3=28+1=257,F4=216+1=65537.F_0 = 2^{1}+1 = 3, \quad F_1 = 2^2+1 = 5, \quad F_2 = 2^4+1 = 17, \quad F_3 = 2^8+1 = 257, \quad F_4 = 2^{16}+1 = 65537.

All five are prime (this can be checked directly for these small cases; 6553765537 is prime because it has no prime factor ≤65537≈256\le \sqrt{65537}\approx 256, verifiable by trial division against primes up to 256256). Check the telescoping identity for n=3n=3:

F0F1F2=3⋅5⋅17=255,F3−2=257−2=255.F_0F_1F_2 = 3 \cdot 5 \cdot 17 = 255, \qquad F_3 - 2 = 257 - 2 = 255.

Matches, confirming Step 1 of the corollary's proof concretely. Now the subtlety, useful for showing the proof does not need each FnF_n individually prime: consider

F5=232+1=4294967297.F_5 = 2^{32} + 1 = 4294967297.

This is famously not prime: 4294967297=641×67004174294967297 = 641 \times 6700417 (a factorization discovered by Euler). The corollary's proof does not require F5F_5 to be prime — it only requires F5F_5 to have some prime factor, e.g. 641641, and that this prime factor is automatically different from every prime factor of F0,…,F4,F6,…F_0,\dots,F_4,F_6,\dots because gcd⁡(F5,Fn)=1\gcd(F_5, F_n) = 1 for all n≠5n \ne 5. Indeed 641641 does not divide 3,5,17,257,655373,5,17,257,65537 (direct check, e.g. 65537/641≈102.2465537 / 641 \approx 102.24, not an integer), consistent with coprimality. This illustrates that the corollary produces an infinite sequence of distinct primes q0=3,q1=5,q2=17,q3=257,q4=65537,q5=641,…q_0=3, q_1=5, q_2=17, q_3=257, q_4=65537, q_5 = 641, \dots even though not every FnF_n is itself prime.

CounterexampleWhy "any two distinct" is essential in the pairwise-coprimality lemma

The corollary's proof crucially uses that FmF_m and FnF_n are coprime for every pair m≠nm \ne n, not just consecutive ones. To see why weakening this to "consecutive Fermat numbers are coprime" would not suffice to prove infinitely many distinct primes, consider a hypothetical (false, but illustrative) scenario where we only knew gcd⁡(Fn,Fn+1)=1\gcd(F_n, F_{n+1}) = 1 for each nn, with no control over gcd⁡(Fn,Fn+2)\gcd(F_n, F_{n+2}) or further-apart pairs. Suppose, purely hypothetically, some sequence of numbers G0,G1,G2,…G_0, G_1, G_2, \dots satisfied only gcd⁡(Gn,Gn+1)=1\gcd(G_n,G_{n+1})=1 but had, say, G0G_0 and G2G_2 sharing a common prime factor rr. Picking prime factors qn∣Gnq_n \mid G_n arbitrarily, nothing prevents choosing q0=q2=rq_0 = q_2 = r: the argument "q0≠q2q_0 \ne q_2" would then fail, because consecutive-only coprimality gives no obstruction to G0,G2G_0, G_2 sharing a factor. The chain of distinctness q0≠q1q_0 \ne q_1, q1≠q2q_1\ne q_2 does not imply q0≠q2q_0 \ne q_2 in general (distinctness is not transitive across gaps unless every pair is controlled). For the genuine Fermat numbers this failure does not occur, precisely because the proof establishes full pairwise coprimality (any m<nm<n, not just n=m+1n = m+1) via Fm∣Fn−2F_m \mid F_n - 2 for all m<nm<n simultaneously. This shows the hypothesis "pairwise" (as opposed to merely "consecutive") coprimality is exactly what is needed, and dropping it to a weaker "consecutive" version breaks the conclusion that all qnq_n are distinct.

Scope, edge cases & common traps

SituationWhat actually holdsCommon error
N=p1⋯pk+1N = p_1\cdots p_k+1Has some prime factor outside the listAssuming NN itself must be prime
Small lists, e.g. {2}\{2\}N=3N = 3, prime, newNone — but doesn't illustrate the general case
Euler's sum ∑1/p\sum 1/pDiverges — a quantitative strengtheningConfusing with the convergent ∑1/p2\sum 1/p^2
Fermat numbers FnF_nPairwise coprime, not all prime (F5F_5 composite)Assuming all FnF_n are prime (Fermat's own conjecture, false)
Contradiction structureAssumes finite list is complete, not just "some" primesMisreading the theorem as being about a specific finite set only

The mathematician behind it

Origins · 1 minEuclid of Alexandria and how this was discovered
EO
Euclid of Alexandria
c. 300 BCE · Hellenistic Alexandria, Ptolemaic Egypt

Euclid compiled the Elements, a thirteen-book synthesis of Greek geometry and number theory that became the most influential mathematics textbook in history. Book IX, Proposition 20 contains the argument given above (phrased geometrically as "prime numbers are more than any assigned multitude of prime numbers"), presented without algebraic notation, using line segments to represent numbers. Little is known of Euclid's life; he is thought to have taught at the Library of Alexandria. His method of rigorous axiomatic-deductive proof, exemplified by this very theorem, set the standard for mathematical argument for over two millennia.

History
- c. 300 BCE — Euclid states and proves Proposition IX.20 of the Elements, the ancestor of the modern proof.
- 1737 — Leonhard Euler proves the divergence of ∑1/p\sum 1/p, giving an independent analytic proof and the first hint of prime density.
- 1730s — Christian Goldbach communicates the Fermat-number coprimality argument to Euler in correspondence.
- 1849 — Various 19th-century textbooks (e.g. by Ivan Vinogradov's predecessors) standardize the modern algebraic phrasing of Euclid's proof used today.
- 1896 — Hadamard and de la Vallée Poussin prove the Prime Number Theorem, vastly refining "infinitely many" to a precise asymptotic density, building on Euler's analytic seed.
Does Euclid's proof tell us that p1p2⋯pk+1p_1 p_2 \cdots p_k + 1 is always prime?

No. This is the single most common misconception. The proof only guarantees that N=p1p2⋯pk+1N = p_1 p_2 \cdots p_k + 1 has at least one prime factor lying outside the original list {p1,…,pk}\{p_1,\dots,p_k\}; it says nothing about whether NN itself is prime. In fact NN is frequently composite: for the list {2,3,5,7,11,13}\{2,3,5,7,11,13\}, N=30031=59×509N = 30031 = 59 \times 509, a product of two primes neither of which was in the original list. The theorem's content is entirely about the existence of a new prime factor, not the primality of NN.

Is the "first prime factor missing" always the smallest possible new prime?

Not necessarily. The construction only guarantees some prime factor of NN is new; it gives no control over which new prime appears or how large it is. In practice the new prime factors found this way can be much larger than the smallest prime not on the list. For example, starting from {2,3,5,7}\{2,3,5,7\}, N=211N = 211, which happens to be prime itself and much larger than the "next" prime 1111 that was missing from the list. The proof is an existence argument, not a constructive way to find the smallest missing prime efficiently.

How does Euler's proof differ logically from Euclid's, and why have both?

Euclid's proof is combinatorial and finite in flavor: it directly exhibits a contradiction from assuming a finite complete list. Euler's proof is analytic: it shows a sum indexed by primes diverges, which is only consistent with infinitely many primes. They are logically independent — neither derives from the other — and Euler's method additionally yields the stronger quantitative fact that primes are not "too sparse" (in contrast, e.g., to squares, for which ∑1/n2\sum 1/n^2 converges). Having both proofs matters because Euler's technique generalizes to prove deeper results, such as Dirichlet's theorem on primes in arithmetic progressions.

Why does the proof require the Fundamental Theorem of Arithmetic, or does it?

Euclid's proof as given only needs the weaker fact that every integer greater than 11 has at least one prime factor (existence), which is proved directly via well-ordering and does not require full unique factorization. Euler's proof, however, genuinely needs the uniqueness part of the Fundamental Theorem of Arithmetic, to correctly enumerate the terms of the Euler product without double-counting or missing any integer with prime factors below xx. So the two proofs lean on different strengths of the same underlying arithmetic structure.

Can the same style of proof show there are infinitely many primes of a specific form, like 4k+34k+3?

Yes, with modification. A Euclid-style argument shows infinitely many primes of the form 4k+34k+3: assuming finitely many such primes q1,…,qkq_1,\dots,q_k, form N=4q1⋯qk−1N = 4q_1\cdots q_k - 1, which is of the form 4k+34k+3 and must have a prime factor of the form 4k+34k+3 (since a product of primes all ≡1(mod4)\equiv 1 \pmod 4 would itself be ≡1(mod4)\equiv 1\pmod 4, but N≡3(mod4)N \equiv 3 \pmod 4), and this factor is shown to differ from every qiq_i. This is a genuine variant, but for a general modulus and residue, only Dirichlet's theorem (using genuinely analytic tools) settles the question in full — Euclid-style tricks work for special residues but not universally.

Does the infinitude of primes tell us anything about how primes are spaced?

By itself, no — infinitude alone is compatible with primes becoming extremely sparse (say, doubling in size at each step) or fairly dense. It is Euler's stronger divergence result, and later the Prime Number Theorem, that pin down the actual density: primes near xx occur with "probability" roughly 1/ln⁡x1/\ln x. This finer question is the subject of Elementary Distribution of Primes, for which the infinitude theorem is a necessary first step but far from the whole story.

Is Euclid's argument constructive, i.e. does it give an algorithm to find new primes?

In a weak sense yes: given any finite list of primes, one can compute N=p1⋯pk+1N = p_1\cdots p_k+1 and factor it to exhibit a genuinely new prime, and this process can be iterated indefinitely. But it is a very inefficient algorithm — the numbers NN grow extremely fast (roughly like the product of all known primes), and factoring large NN is computationally expensive. In practice, no serious prime-generation algorithm uses this method; primality testing algorithms (e.g. Miller–Rabin, AKS) search directly among candidate integers instead.

Before this

Where this leads