The Euclid–Mullin sequence starts with 2 and repeatedly turns the primes already found into a new prime. Its first terms are 2, 3, 7, 43, 13, 53, 5, 6,221,671, 38,709,183,810,571, …. The rule is simple, but the sequence is not an increasing list of primes and the number formed at each step is not always prime.
Euclid–Mullin Rule
Let Pn = a1a2…an, the product of all terms found so far. Then
an+1 = spf(Pn + 1)
Here, spf means the smallest prime factor. The sequence begins with a1 = 2.
How the First Terms Are Built
The early steps show exactly what the rule does. For the first few terms, Pn + 1 happens to be prime. The first change in behavior comes at 1807.
| Term | Product + 1 | Factorization | Selected Prime |
|---|---|---|---|
| a1 | 2 | 2 | 2 |
| a2 | 3 | 3 | 3 |
| a3 | 7 | 7 | 7 |
| a4 | 43 | 43 | 43 |
| a5 | 1,807 | 13 × 139 | 13 |
| a6 | 23,479 | 53 × 443 | 53 |
| a7 | 1,244,335 | 5 × 248,867 | 5 |
| a8 | 6,221,671 | prime | 6,221,671 |
| a9 | 38,709,183,810,571 | prime | 38,709,183,810,571 |
Why 1807 Produces 13
The first four terms can create a misleading pattern:
2 × 3 × 7 × 43 + 1 = 1,807
1,807 = 13 × 139
The Euclid–Mullin sequence does not keep 1807. It keeps the smallest prime factor, so a5 = 13.
Product + 1 Is Not Guaranteed to Be Prime
The number Pn + 1 is guaranteed to have no prime factor that already appears among a1, …, an. That does not make Pn + 1 prime. It may be composite, as 1807 shows.
How 5 Appears After 53
The sequence is not arranged by numerical size. After 13, the next selected prime is 53 because
2 × 3 × 7 × 43 × 13 + 1 = 23,479 = 53 × 443.
Including 53 gives a product of 1,244,334, so the next candidate is
1,244,334 + 1 = 1,244,335 = 5 × 248,867.
The smallest prime factor is 5, which becomes a7. A small prime can therefore appear after much larger primes if it has not appeared before and becomes the smallest divisor of the next candidate.
Test a Euclid–Mullin Candidate
Try 1807, 1244335, or 6221671 to compare composite candidates with a generated prime.
Why Earlier Primes Cannot Appear Again
Suppose Pn is the product of the primes already in the sequence. Every earlier term ai divides Pn, so
Pn ≡ 0 (mod ai)
and therefore
Pn + 1 ≡ 1 (mod ai).
So no earlier ai can divide Pn + 1. Equivalently, Pn and Pn + 1 are coprime. Every prime factor of the new candidate is different from every prime already selected.
This also explains why the process never runs out of new primes. Every integer greater than 1 has at least one prime factor, and every prime factor of Pn + 1 is new to the sequence.
The Connection With Euclid’s Proof
Euclid’s classical argument for infinitely many primes uses the same product-plus-one idea. Given a finite collection of primes, their product plus 1 is not divisible by any prime in that collection. The number itself may be prime or composite, but at least one of its prime factors must be new.
The Euclid–Mullin sequence turns that observation into a deterministic recurrence: whenever several new prime factors are available, it selects the smallest one.
The Sequence Can Jump Up or Down
There is no monotonic growth rule. The position of a prime depends on divisibility of the successive product-plus-one candidates, not on the prime’s numerical size. This is why 43 arrives as the fourth term, while 5 does not appear until the seventh term and 31 waits until the fiftieth.
| Prime | Position |
|---|---|
| 2 | 1 |
| 3 | 2 |
| 5 | 7 |
| 7 | 3 |
| 11 | 12 |
| 13 | 5 |
| 17 | 13 |
| 19 | 36 |
| 23 | 25 |
| 29 | 33 |
| 31 | 50 |
| 37 | 18 |
| 41 | Not among the first 51 known terms |
| 43 | 4 |
Among primes smaller than 41, every one appears somewhere in the first 51 known terms. That makes 41 the smallest prime not yet seen in the known part of the sequence.
Euclid–Mullin, Sylvester, and the Largest-Factor Rule
The sequences agree at first because 2, 3, 7, and 43 each arise from a prime product-plus-one value. They separate at 1807.
| Rule | What Happens to 1,807 = 13 × 139 | Next Value |
|---|---|---|
| Euclid–Mullin sequence | Select the smallest prime factor | 13 |
| Second Mullin sequence | Select the largest prime factor | 139 |
| Sylvester’s sequence | Keep the entire product-plus-one value | 1,807 |
The choice at one step changes every product that follows. The smallest-factor Euclid–Mullin sequence and the largest-factor sequence are therefore different objects, even though both begin 2, 3, 7, 43.
A Result That Applies Only to the Second Sequence
The largest-prime-factor version is known to omit infinitely many primes. That result must not be transferred to the original smallest-prime-factor Euclid–Mullin sequence, for which the question of whether every prime eventually appears remains open.
Why Computing Later Terms Becomes Difficult
The recurrence is deterministic, but determining the next value requires more than showing that a candidate is composite. The sequence needs the smallest prime factor of Pn + 1.
This creates a sharp distinction between primality testing and prime factorization. A primality test can establish that a large integer is composite without revealing its smallest prime divisor. Euclid–Mullin computation cannot move to the next term until that divisor is known.
The product also retains every large prime already selected. When a very large term enters the sequence, every later Pn contains it, so the candidate numbers can grow quickly.
| Target Term | Candidate Size | What Was Needed |
|---|---|---|
| a44 | 180 digits | A full factorization in 2010 revealed a 68-digit smaller prime factor, which became a44. |
| a48 | 256 digits | A 75-digit factor found in 2012 became a48. |
| a52 | 335 digits | The smallest prime factor is still required. |
The 51 Known Terms
The large jumps are easier to see when the terms are kept in sequence order. The entries at positions 44 and 48 are especially large: they have 68 and 75 digits respectively.
Show all 51 known Euclid–Mullin terms
- 2
- 3
- 7
- 43
- 13
- 53
- 5
- 6,221,671
- 38,709,183,810,571
- 139
- 2,801
- 11
- 17
- 5,471
- 52,662,739
- 23,003
- 30,693,651,606,209
- 37
- 1,741
- 1,313,797,957
- 887
- 71
- 7,127
- 109
- 23
- 97
- 159,227
- 643,679,794,963,466,223,081,509,857
- 103
- 1,079,990,819
- 9,539
- 3,143,065,813
- 29
- 3,847
- 89
- 19
- 577
- 223
- 139,703
- 457
- 9,649
- 61
- 4,357
- 87,991,098,722,552,272,708,281,251,793,312,351,581,099,392,851,768,893,748,012,603,709,343
- 107
- 127
- 3,313
- 227,432,689,108,589,532,754,984,915,075,774,848,386,671,439,568,260,420,754,414,940,780,761,245,893
- 59
- 31
- 211
Does Every Prime Eventually Appear?
Albert A. Mullin introduced the recursive prime problem in 1963. For the smallest-factor sequence, the central question remains unresolved: does every prime number eventually occur?
The rule proves that each term is a new prime, but that is not the same as proving that every prime will eventually be selected. A prime can remain absent for a long time because it must become the smallest prime factor of one particular product-plus-one candidate.
Proved
Every term is prime, no term repeats, and the process produces infinitely many distinct primes.
Observed in the Known Terms
The sequence is known through a51 = 211, and 41 has not yet appeared.
Still Unknown
It is not known whether 41 eventually appears or whether the sequence contains every prime.
The Unresolved 52nd Term
Checked on August 25, 2026: the known sequence reaches a51 = 211. Determining a52 requires the smallest prime factor of the next product-plus-one value, a 335-digit composite integer. That smallest factor has not yet been determined.
Next-Term Condition
a52 = spf(P51 + 1)
P51 + 1 has 335 decimal digits, so the recurrence is fully defined even though the next prime is not yet known.