I was eleven when a teacher wrote the numbers from 1 to 30 on the board and asked us to cross out every number that could be split into smaller whole-number pieces. We crossed out 4, because it is 2 times 2. We crossed out 6, 8, 9, 10, and kept going until only a stubborn few were left standing: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29. Nothing we did could break them apart. That was my first meeting with prime numbers, and I have never quite got over the strangeness of it. Most numbers are built from smaller numbers. A few are not built from anything at all, and those few turn out to build everything else.
A prime number is a natural number greater than 1 whose only positive divisors are 1 and itself. That is the whole definition, and it fits in one sentence. Yet from that one sentence comes a subject that has occupied mathematicians for more than two thousand years, that guards the secrets of the internet, that shows up in the life cycles of insects, and that still holds open problems with a prize of one million US dollars attached. This article follows the prime numbers from that classroom board to the largest prime anyone has ever found, a number with 41,024,320 digits, discovered in October 2024. You will meet Euclid's proof that the primes never run out, the sieve that finds them by crossing out, the theorem a fifteen-year-old guessed and that took a century to prove, the twin primes that refuse to separate, the perfect numbers that hide inside Mersenne primes, and the three great unsolved problems that still resist every attempt. No advanced mathematics is assumed. Every worked calculation has been checked by hand, and the numbers are given exactly as worked.
1. What Is a Prime Number?
A prime number is a natural number greater than 1 whose only positive divisors are 1 and itself. Take 7. You can divide 7 by 1 and by 7, and by nothing else whole. Take 6 instead. You can divide 6 by 1, 2, 3 and 6, so 6 is not prime. It is composite, a number built by multiplying smaller numbers. The definition has two parts, and both matter. "Greater than 1" keeps 1 out of the club, for reasons Section 2 explains in full. "Only divisors 1 and itself" is what makes a prime indivisible, and indivisibility is the whole story of this article.
The first primes are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. Notice something at once: after 2, every prime is odd. That has to be so. Any even number larger than 2 can be divided by 2, so it has a divisor other than 1 and itself. Two is the only even prime, and it is the odd one out in the most literal sense: the only prime that is even, and the only prime that sits next to another prime, since 2 and 3 differ by 1. Every other pair of neighbouring primes differs by at least 2, because between any two odd numbers there is an even one.
Why call these numbers the atoms of arithmetic? Because of a fact this article proves in Section 3: every whole number greater than 1 is either prime or a unique product of primes. The number 60 is 2 times 2 times 3 times 5, and no other combination of primes gives 60. The number 84 is 2 times 2 times 3 times 7. Break a number down far enough and you always arrive at primes, and you always arrive at the same primes. Atoms in chemistry combine into molecules in exactly this way, and the analogy is not decoration. It is the reason the subject matters. If you understand primes, you understand the building blocks of every integer there is.

The definition in one sentence
A prime number is a natural number greater than 1 whose only positive divisors are 1 and itself. There is a small piece of housekeeping hidden in the phrase "natural number". Mathematicians mean the counting numbers 1, 2, 3, and so on. Negative numbers, fractions and decimals are not prime, because the definition is about the counting numbers and their divisors. Zero is not prime either. Zero can be divided by every number, so it fails the definition completely, and it is not greater than 1 in any case.
Test the definition on a few numbers until it feels automatic. Is 13 prime? Its divisors are 1 and 13 only, so yes. Is 27 prime? It is 3 times 9, so no. Is 97 prime? Try dividing it by 2, 3, 5 and 7, the primes up to its square root, and none of them divides it evenly, so yes, 97 is prime. That shortcut, testing only primes up to the square root, is the heart of the sieve in Section 5, and it is worth remembering: to test a number, you never need to test divisors larger than its square root, because divisors come in pairs, and one member of each pair is always at or below the square root.
The first primes, and the only even one
The first 25 primes run from 2 to 97. They are the primes below 100, the same list the sieve in Section 5 produces, and they are worth having in one place because the rest of the article keeps returning to them.
Position | Prime | Position | Prime |
|---|---|---|---|
1st | 2 | 14th | 43 |
2nd | 3 | 15th | 47 |
3rd | 5 | 16th | 53 |
4th | 7 | 17th | 59 |
5th | 11 | 18th | 61 |
6th | 13 | 19th | 67 |
7th | 17 | 20th | 71 |
8th | 19 | 21st | 73 |
9th | 23 | 22nd | 79 |
10th | 29 | 23rd | 83 |
11th | 31 | 24th | 89 |
12th | 37 | 25th | 97 |
13th | 41 |
Two curiosities in that table are worth a smile. The 21st prime is 73, and its mirror image, 37, is the 12th prime. That pairing made 73 famous as the "best number" in the television show The Big Bang Theory, and the mathematics checks out: count the list and 73 really is 21st, 37 really is 12th. The other curiosity is the thinning. The first ten primes fit inside 29. The next fifteen need the whole stretch up to 97. Primes get rarer as numbers grow, and Section 6 measures exactly how fast they thin out, while Section 4 proves they never stop coming.
2. Why 1 Is Not a Prime Number
Ask a room of people whether 1 is a prime number and a surprising number will say yes. The reasoning sounds fair: 1 can only be divided by 1 and itself, and 1 is itself, so does it not fit the definition? The answer is no, and the reason is not a technicality. It is a choice mathematicians made deliberately, because letting 1 into the club would break the most important theorem in the subject. One is not prime. It is not composite either. It is in a class of its own, and that class has exactly one member.
The definition says a prime is greater than 1 with exactly two positive divisors, 1 and itself. The number 1 has exactly one positive divisor: itself. It fails the definition on the count alone. But definitions in mathematics are not handed down from nature. They are chosen because they make the subject work cleanly. The choice to exclude 1 makes the fundamental theorem of arithmetic true, and that theorem is the reason primes are called the atoms of arithmetic.
One divisor is not enough
Think of it as a membership rule with a purpose. A prime must have exactly two distinct positive divisors. Two has 1 and 2. Three has 1 and 3. One has only 1, which is both 1 and itself at once, so the two divisors collapse into one. There is no way to count 1 twice without cheating. The same test settles zero, which has infinitely many divisors, and negative numbers, which are outside the definition entirely.
I remember the moment this clicked for me, years after that classroom board. I had been treating "prime" as a property a number either has or has not, like being even or odd. It is not. It is a definition, and definitions are tools. Mathematicians tried it the other way in the past. Some nineteenth-century tables listed 1 as prime. The practice died out because it made every statement about primes longer and uglier. Every theorem would have needed the words "except 1" attached. Excluding 1 from the start keeps the theorems clean, and the theorems are what matter.
What breaks if 1 counts as prime
Here is the breakage, worked out in full. Take 6. Its prime factorisation is 2 times 3. If 1 were prime, then 6 would also be 1 times 2 times 3, and 1 times 1 times 2 times 3, and 1 times 1 times 1 times 2 times 3, with no end to the ones. The factorisation would no longer be unique. Every number would have infinitely many prime factorisations, all differing by how many ones you threw in. The claim that every number has one prime recipe, the fundamental theorem of arithmetic, would be false.
Work it with 60, the example Section 3 uses in full. Without 1, the factorisation is 60 equals 2 times 2 times 3 times 5, and that is the only way to write 60 as a product of primes. Allow 1 as a prime and you get 60 equals 1 times 2 times 2 times 3 times 5, and 1 times 1 times 2 times 2 times 3 times 5, and so on without end. The uniqueness is gone, and with it goes the whole idea of primes as atoms. Atoms are useful because a molecule has a definite recipe. A recipe that can be padded with any number of invisible ingredients is not a recipe at all. That is why 1 is not prime: not because of a pedantic rule, but because the alternative destroys the structure the definition exists to protect.
3. The Fundamental Theorem of Arithmetic: Every Number Has One Prime Recipe
Every integer greater than 1 is either prime or a unique product of primes, up to the order of the factors. That is the fundamental theorem of arithmetic, and it is the sentence that justifies the title of this article. It says that primes are the atoms of arithmetic in the strongest possible sense. Not only can every number be broken into primes. It can be broken into primes in exactly one way. The number 60 is 2 times 2 times 3 times 5. Rearrange the factors as 3 times 5 times 2 times 2 and you have the same recipe in a different order. There is no second recipe. There is no way to build 60 from 7 and 11, or from any other set of primes. The atoms are fixed, and so is the molecule they make.
The theorem has two halves, and both need saying. The first half is existence: every number greater than 1 can be factored into primes. Keep splitting a composite number into smaller factors and the process must stop, because the factors keep getting smaller and whole numbers cannot shrink forever. When it stops, everything left is prime. The second half is uniqueness: there is only one such factorisation. Euclid proved the key step, that if a prime divides a product it must divide one of the factors, and uniqueness follows. The proof is not hard, and the result is enormous. It means the primes are not merely a curiosity. They are the complete inventory of multiplicative building blocks, and every integer carries its own fingerprint in primes.
Factor trees, worked by hand
A factor tree is the simplest way to see the theorem at work. Start with a number, split it into two factors, split those, and keep going until every branch ends in a prime. Do it two different ways and the leaves come out the same. That is the theorem, visible on the page.
Take 60. Split it as 6 times 10. Then 6 is 2 times 3, and 10 is 2 times 5. The leaves are 2, 3, 2, 5. Collect them: 60 equals 2 times 2 times 3 times 5. Check: 2 times 2 is 4, 4 times 3 is 12, 12 times 5 is 60. Now split 60 a different way, as 4 times 15. Then 4 is 2 times 2, and 15 is 3 times 5. The leaves are 2, 2, 3, 5 again. Same primes, same recipe. The tree changed. The leaves did not.
Take 84. Split it as 6 times 14. Then 6 is 2 times 3, and 14 is 2 times 7. The leaves are 2, 3, 2, 7, so 84 equals 2 times 2 times 3 times 7. Check: 2 times 2 is 4, 4 times 3 is 12, 12 times 7 is 84. Split it differently, as 4 times 21. Then 4 is 2 times 2, and 21 is 3 times 7. The leaves are 2, 2, 3, 7 once more. Two different trees, one set of leaves. That is what uniqueness looks like when you do it with your own hands.

Why uniqueness matters
Uniqueness is what turns a curiosity into a tool. Because every number has exactly one prime recipe, the recipe can stand in for the number. Two numbers share a factor exactly when their recipes share a prime. The greatest common divisor of two numbers is the product of the primes their recipes share, each taken at its lowest power. The least common multiple is the product of all the primes in either recipe, each taken at its highest power. The cicadas of Section 13 owe their survival strategy to exactly this arithmetic: 13 and 17 share no prime factors, so their cycles coincide only once every 221 years.
Uniqueness also explains why the whole of number theory keeps coming back to primes. Questions about divisibility, about remainders, about which numbers divide which, are all questions about prime recipes. A number is a square exactly when every prime in its recipe appears an even number of times. A number is a cube exactly when every prime appears a multiple of three times. The recipe carries the information. Strip a number down to its primes and you have stripped it down to everything that matters about how it divides and is divided. That is why primes are called atoms, and why the rest of this article is a tour of what those atoms do.
4. Euclid's Proof: The Primes Never Run Out
Around 300 BCE, in Alexandria, Euclid wrote down a proof that has never been improved upon for elegance. It appears as Proposition 20 of Book IX of his Elements, and it settles one of the oldest questions in mathematics: do the primes ever run out? The answer is no. There are infinitely many prime numbers. No list of primes, however long, is complete. However many primes you have found, there is always another one waiting beyond them. The proof takes a paragraph, and it has been working, unchanged, for more than two thousand years.
Euclid's own wording, in translation, is this:
Prime numbers are more than any assigned multitude of prime numbers. — Euclid, Elements, Book IX, Proposition 20, circa 300 BCE
The phrasing is old-fashioned, but the meaning is plain: take any multitude of primes you like, however large, and there are more primes than that. The proof builds a new prime out of the old ones, and the construction is so simple that you can do it yourself with a pocket calculator.
Elements, Book IX, Proposition 20 (circa 300 BCE)
Here is the argument. Suppose you have a finite list of primes. It can be any list: the first three primes, the first thousand, or every prime anyone has ever found. Multiply them all together. Then add 1. Call the result N. Now ask what divides N. No prime on your list can divide it, because each one divides the product exactly, and so leaves a remainder of 1 when it tries to divide N. But N is greater than 1, so it must have a prime divisor, by the fundamental theorem of arithmetic. That prime divisor is not on your list. You started with a complete list, or so you claimed, and you have just found a prime that is not on it. The list was not complete. No finite list is. The primes go on forever.
Two details deserve care, because textbooks often blur them. First, Euclid's original argument is a direct proof by cases, not strictly a proof by contradiction as it is often presented. Euclid does not assume there are finitely many primes and derive a contradiction. He takes any finite set of primes and produces one more. Either presentation is acceptable if it is labelled correctly, and I disagree with the textbooks that present the contradiction version as Euclid's own. It is a fine proof, and it is not quite his. Second, the argument says nothing about which new prime you will find. It says only that one exists. That modesty is part of its power. It proves infinity without finding a single new prime by name.
The structure of the argument, taking a claim and showing it forces a new conclusion step by step, is the same proof structure that How Algebra Works teaches with equations: state what you know, transform it carefully, and watch what must follow. Euclid was doing algebra's work more than a thousand years before algebra had a name.
The worked example: 2 × 3 × 5 × 7 × 11 × 13 + 1 = 30,031 = 59 × 509
Take the first six primes: 2, 3, 5, 7, 11 and 13. Multiply them. Two times 3 is 6. Six times 5 is 30. Thirty times 7 is 210. Two hundred and ten times 11 is 2,310. Two thousand three hundred and ten times 13 is 30,030. Add 1, and you get 30,031. Now ask which primes divide 30,031. Not 2, not 3, not 5, not 7, not 11, not 13: each of them divides 30,030 exactly, so each leaves a remainder of 1 against 30,031. But 30,031 does have prime divisors. It is 59 times 509. Check: 59 times 500 is 29,500, and 59 times 9 is 531, and 29,500 plus 531 is 30,031. Both 59 and 509 are prime, and neither was in the starting list. Euclid's point, made concrete: six primes went in, and two brand-new primes came out.
I worked this example out by hand the first time I taught it, and I remember the small shock of it. The construction feels like it ought to produce a prime, and the fact that it does not is the most instructive part. The new number need not be prime itself. Its prime factors are the new primes. That distinction is the trap the next subsection is about, and it is the most common misunderstanding in the whole subject.
The trap: the new number need not be prime itself
Here is the misstatement to avoid, because it appears in textbooks, videos and popular articles: "Multiply all the primes together, add 1, and you get a new prime." That is false, and 30,031 is the counterexample sitting in plain sight. It is 59 times 509. It is not prime at all. What Euclid's construction guarantees is a new prime factor, not a new prime number. The number you build may be prime, as it is for the first five primes, where 2 times 3 times 5 times 7 times 11 plus 1 is 2,311, which is prime. Or it may be composite, as it is for the first six. Either way, its prime factors are new, and that is all the proof needs.
The confusion is understandable, because the first few cases all give primes, and the pattern feels so clean that it is tempting to trust it. The pattern breaks at the sixth step, and the break is the lesson. In mathematics, a pattern that holds five times is not a proof. It is a hint, and hints have to be checked. Euclid's proof does not depend on the pattern holding. It depends on the remainder argument, which holds every time, whether the constructed number is prime or composite. That is why the proof has survived for twenty-three centuries while the misstatement keeps needing correction.
Euler gave a second, completely different proof in 1737, showing that the sum of the reciprocals of the primes diverges, which also proves there are infinitely many of them. Two proofs, two centuries apart in spirit, both pointing at the same inexhaustible supply. The primes never run out. The rest of this article is about how they are distributed, how they are found, and what they are for.
5. The Sieve of Eratosthenes: Finding Primes by Crossing Out
Euclid proved the primes never end. He did not say how to find them. For that, the ancient world had a better tool, and it is still the first algorithm most students meet. It is called the sieve of Eratosthenes, and it works by elimination. Write down the numbers. Cross out the composites. What is left is prime. The method is more than two thousand years old, it needs no division, and it is still the standard first algorithm taught for finding primes, used in computing for ranges up to tens of millions.
Who was Eratosthenes (circa 276–194 BCE)
Eratosthenes of Cyrene was born circa 276 BCE and died circa 194 BCE in Alexandria, where he served as chief librarian of the great Library. He is best remembered for measuring the circumference of the Earth with a stick, a shadow and a piece of geometry, getting remarkably close to the true value. The sieve is a smaller achievement, and a more practical one. It is described in the Introduction to Arithmetic of Nicomachus, written centuries later, because Eratosthenes' own works survive only indirectly. The idea is simple enough to have survived the loss of its author's books: to find the primes, remove everything that is not prime, and the primes are what remain.
The Encyclopaedia Britannica biography of Eratosthenes records both the librarian and the measurer of the Earth, and the sieve sits naturally between those two roles. A librarian sorts and catalogues. A measurer works with what can be checked directly. The sieve does both. It sorts the numbers and it checks each one by the simplest possible test: is it a multiple of something smaller?
Sieving to 100, step by step
Write the numbers from 2 to 100 in a grid. Leave 2 alone and cross out every multiple of 2: 4, 6, 8, and so on. The next surviving number is 3. Leave 3 alone and cross out every multiple of 3: 6, 9, 12, and so on. The next surviving number is 5. Leave 5 alone and cross out its multiples. The next surviving number is 7. Leave 7 alone and cross out its multiples. And then you stop. That is the whole algorithm, and the stopping rule is the clever part.
To sieve to 100, you only need primes up to the square root of 100, which is 10. The passes are 2, 3, 5 and 7, because 7 squared is 49 and 11 squared is 121, which is over 100. Any composite number up to 100 must have a prime factor at or below 10, so once the multiples of 2, 3, 5 and 7 are gone, everything left is prime. Four passes, and the work is done. The number 1 is neither prime nor composite, and it is left out of the grid entirely.
The 25 primes below 100 are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97. They thin out as the grid goes on. The first ten numbers hold four primes. The last ten hold only one, 97. The table below shows the thinning decade by decade.
Range | Primes in the range | Count |
|---|---|---|
1–10 | 2, 3, 5, 7 | 4 |
11–20 | 11, 13, 17, 19 | 4 |
21–30 | 23, 29 | 2 |
31–40 | 31, 37 | 2 |
41–50 | 41, 43, 47 | 3 |
51–60 | 53, 59 | 2 |
61–70 | 61, 67 | 2 |
71–80 | 71, 73, 79 | 3 |
81–90 | 83, 89 | 2 |
91–100 | 97 | 1 |
Total | 25 |

Try it yourself with a piece of paper and the numbers to 100. The physical act of crossing out teaches something that reading about it does not: the primes are not found by a test applied to each number one at a time, but by removing whole families at once. Every multiple of 2 goes in a single sweep. Every multiple of 3 goes in the next. The sieve is a subtractive instrument, and its elegance is that it never asks whether a number is prime. It asks whether a number is a multiple, and the primes are simply what survives the asking.
6. How Many Primes Are There? Counting to a Million and Beyond
There are infinitely many primes, and they get rarer as numbers grow. Both facts are true at once, and the tension between them is the subject of this section. The primes never stop, but they thin out, and the thinning follows a pattern so regular that a fifteen-year-old spotted it and a century of mathematics was needed to prove it. First, the counts themselves, verified by sieve.
Mathematicians write pi(x) for the number of primes less than or equal to x. The symbol pi here has nothing to do with the circle constant. It is the prime-counting function, and its values are the hard data of the subject. There are 4 primes up to 10. There are 25 up to 100. There are 168 up to 1,000. There are 1,229 up to 10,000. There are 9,592 up to 100,000. There are 78,498 up to one million. There are 50,847,534 up to one billion. Every one of these counts up to one million was recomputed by sieve for this article. The billion count comes from two published tables that agree exactly.
pi(100) = 25, pi(1,000) = 168, pi(1,000,000) = 78,498
Look at the proportions. A quarter of the numbers up to 100 are prime. By 1,000, the share has fallen to about one in six. By one million, it is about one in thirteen. By one billion, it is about one in twenty. The primes are not vanishing. They are spreading out, the way trees thin as a forest grows taller, each one needing more room. The table below puts the counts side by side, so the thinning is visible in a single glance.
x | pi(x): primes up to x | Share that is prime |
|---|---|---|
10 | 4 | 40 percent |
100 | 25 | 25 percent |
1,000 | 168 | 16.8 percent |
10,000 | 1,229 | 12.29 percent |
100,000 | 9,592 | 9.592 percent |
1,000,000 | 78,498 | 7.8498 percent |
1,000,000,000 | 50,847,534 | 5.0847534 percent |
Check the arithmetic on the shares. Twenty-five out of 100 is 25 percent. One hundred and sixty-eight out of 1,000 is 16.8 percent. Seventy-eight thousand four hundred and ninety-eight out of one million is 7.8498 percent. Fifty million eight hundred and forty-seven thousand five hundred and thirty-four out of one billion is 5.0847534 percent. The percentages fall steadily, and they fall slowly. From one million to one billion, a thousandfold increase in range, the share of primes falls only from about 7.8 percent to about 5.1 percent. The thinning is real, and it is unhurried.
The thinning: about 1 in 14 near a million, 1 in 21 near a billion
A useful way to feel the thinning is to ask a different question: pick a random integer near x. What are the chances it is prime? The answer is about 1 divided by the natural logarithm of x, written 1 over ln x. Near one million, the natural logarithm of one million is about 13.8, so the chance is about 1 in 14. Near one billion, the natural logarithm is about 20.7, so the chance is about 1 in 21. Those are not exact figures. They are the smooth trend underneath the irregular reality, and the next section explains where that trend comes from.
The irregularity matters too. Primes do not arrive at even intervals. Sometimes two primes sit two apart, the twin primes of Section 8. Sometimes the gap stretches, and Section 14 measures the longest waits ever found. The counts in the table are averages over whole ranges. Inside any range, the primes bunch and spread in ways no simple rule predicts. That combination, a smooth average with ragged local behaviour, is the central puzzle of the subject. The average is now a theorem. The raggedness is still, in large part, a mystery.
7. The Prime Number Theorem: Gauss's Teenage Guess
In 1792 or 1793, a fifteen-year-old boy in Brunswick was counting primes. His name was Carl Friedrich Gauss, and he would become the greatest mathematician of his century. He had tables of primes, and he noticed something. The density of the primes, the share of numbers that are prime, seemed to fall off in step with the natural logarithm. He wrote the guess down in a letter years later, in 1849, saying he had made it "in 1792 or 1793, when I was 15 or 16". He did not publish it. Legendre conjectured a version of the same idea in 1798. A hundred years passed before anyone proved it. The guess was that pi(x), the number of primes up to x, is approximately x divided by ln x, and the ratio of the two tends to 1 as x grows. That statement is the prime number theorem, and it is the central fact about how primes are distributed.
The theorem needs one piece of vocabulary. The natural logarithm, ln x, is the logarithm to the base e, the number about 2.718 that governs continuous growth. If logarithms are unfamiliar, How Calculus Works explains where e and the natural logarithm come from. For this section, all you need is the behaviour: ln x grows very slowly. The natural logarithm of 100 is about 4.6. Of 1,000, about 6.9. Of one million, about 13.8. Of one billion, about 20.7. A thousandfold increase in x adds less than 7 to ln x. That slow growth is why the primes thin out so gradually.
A 15-year-old counts primes (1792 or 1793)
Gauss was counting by hand, working through tables of primes that others had compiled, and looking for the pattern in the density. The pattern he found was that the proportion of primes near x is about 1 over ln x. He could not prove it. Nobody could, for another century. The gap between guessing and proving is a theme of this article: the twin prime conjecture, Goldbach's conjecture and the Riemann hypothesis are all guesses of the same kind, still waiting for their proofs. Gauss's guess had the good fortune to be proved, in 1896, by Jacques Hadamard and Charles de la Vallée Poussin, working independently, using complex analysis and the Riemann zeta function. Elementary proofs, avoiding complex analysis, were found by Atle Selberg and Paul Erdős around 1948. The theorem is now certain. The century it took is a measure of how deep the statement is.
pi(x) is approximately x divided by ln x
Test the formula against the counts from Section 6. For x equal to 100, x divided by ln x is about 21.7, against the true count of 25. For x equal to 1,000, the formula gives about 144.8, against the true 168. For one million, it gives 72,382.4, against the true 78,498, an underestimate of about 7.8 percent. For one billion, it gives 48,254,942, against the true 50,847,534. The formula overestimates at x = 10 and underestimates from 100 upward, and the underestimate does not shrink steadily: it grows from about 13 percent at 100 to about 14 percent at 1,000, then falls to about 8 percent at a million and about 5 percent at a billion. That is what the theorem promises: not that the formula is close for small numbers, but that the ratio of the true count to the formula tends to 1 as x grows without bound. It is a statement about the far horizon, not about the numbers you can count on a page.
There is a better estimate, called the logarithmic integral, written Li(x). It is the area under the curve 1 over ln t, from 2 to x. At one million, Li(x) is about 78,626.5, only about 129 above the true count of 78,498. That is far closer than the 72,382 given by x divided by ln x. The improvement is real, and it is the reason the logarithmic integral is the working estimate mathematicians actually use. The prime number theorem, in its sharpest form, is a statement about Li(x), and the Riemann hypothesis of Section 15 is a statement about how far pi(x) can stray from Li(x). The whole subject hangs together on that one comparison: the true count, the simple estimate, and the better estimate, and the question of how far apart they can get.

Proved in 1896: Hadamard and de la Vallée Poussin
The proof, when it finally came, used mathematics Gauss did not have: the theory of functions of a complex variable, and the Riemann zeta function, a function that encodes the primes in its zeros. Hadamard in France and de la Vallée Poussin in Belgium proved the theorem independently in the same year, 1896, both building on Riemann's 1859 paper. The proof showed that the guess a fifteen-year-old had made from tables was exactly right in the limit. It also showed something about the nature of mathematical proof. A pattern in the data is not a theorem until someone proves it, and the proof may need tools that do not exist yet when the pattern is first seen.
The prime number theorem is also a statement about infinity of a subtler kind than Euclid's. Euclid proved the primes never end. The prime number theorem says how they end, or rather how they thin, as you travel toward infinity. The density falls like 1 over ln x, which tends to zero, so the primes become an ever smaller share of the numbers. But the count itself, pi(x), grows without bound, roughly like x over ln x, so there are always more primes ahead. Thinning and inexhaustible at once: that is the prime number theorem in one sentence.
8. Twin Primes: Pairs That Refuse to Separate
Some primes come in pairs, two apart, like fence posts with a single composite number between them. Three and 5. Five and 7. Eleven and 13. Seventeen and 19. Twenty-nine and 31. Forty-one and 43. These are the twin primes, pairs of primes differing by 2, and they are the most famous small pattern in the subject. Five is the only prime that belongs to two twin pairs, 3 and 5, and 5 and 7, because any three consecutive odd numbers contain a multiple of 3, so no other prime can sit in two pairs at once.
Are there infinitely many twin primes? Nobody knows. That is the twin prime conjecture, and it has been open for as long as anyone has asked it. Euclid proved there are infinitely many primes. He proved nothing about pairs. The primes could, for all anyone can prove, eventually stop coming in pairs, leaving the last twin pair somewhere out in the dark. Every piece of evidence says they do not stop. The evidence is not a proof, and the gap between evidence and proof is the subject of the next section.
What twin primes are
A twin prime pair is two primes that differ by 2. The gap of 2 is the smallest possible gap between two odd primes, since any two odd numbers differ by an even amount, and 2 is the smallest even gap. The pairs start (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), and they keep appearing as far as anyone has searched. Among the first 25 primes, the twin pairs are (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61) and (71, 73). Eight pairs among the first 25 primes, and the pairs get rarer as the numbers grow, in step with the thinning of the primes themselves.
The name is slightly misleading, because twins in the usual sense are born together, and twin primes are separated by a single composite number, the even number between them. Three and 5 have 4 between them. Eleven and 13 have 12. The pair is a small island of primality in a sea of composites, and the islands get farther apart as the numbers grow. The largest known twin prime pair, described below, has 388,342 digits in each member. The two members differ by 2. The gap between that pair and the next pair is unimaginably larger.
The record pair: 388,342 digits, found 2016, still unbeaten
The largest known twin prime pair is 2,996,863,034,895 times 2 raised to 1,290,000, plus or minus 1. Each of the two primes has 388,342 digits. The pair was discovered in September 2016 by Tom Greer, working with the PrimeGrid distributed computing project. As of November 2026 it is still the record, and it has stood for ten years. The next-largest twin primes are far smaller: second place is a pair of 200,700 digits found in December 2011, and a new third-place pair of 144,654 digits was found on 10 January 2026. The 2016 record is not close to being challenged.
The digit count can be checked directly. The number is roughly 2,996,863,034,895 times 2 to the power 1,290,000, and the number of digits is the whole-number part of the base-10 logarithm of that product, plus 1. The logarithm of 2,996,863,034,895 is about 12.4767, and 1,290,000 times the logarithm of 2 is about 388,328.7, so the sum is about 388,341.2, and the digit count is 388,342. The arithmetic confirms the published figure exactly. The pair is real, it is enormous, and it is still the biggest pair of twins anyone has found.

Brun's constant, about 1.902160578
Here is a strange and beautiful fact about twin primes. Add up the reciprocals of all the primes, 1 over 2 plus 1 over 3 plus 1 over 5 and so on, and the sum grows without bound. Euler proved that in 1737, and it is a second proof that there are infinitely many primes. Now add up the reciprocals of the twin primes only, counting each prime once: 1 over 3 plus 1 over 5 plus 1 over 7 plus 1 over 11 plus 1 over 13, and so on. Viggo Brun proved in 1919 that this sum converges. It settles down to a finite number, called Brun's constant, estimated by Thomas Nicely as approximately 1.902160578, from computing twin primes up to one hundred trillion (10 to the power 14). Whether Brun's constant is rational, irrational or transcendental is unknown.
The contrast is the point. The primes are numerous enough that the sum of their reciprocals diverges. The twin primes are sparse enough that the sum of their reciprocals converges, even if there are infinitely many of them. Brun's theorem does not settle the twin prime conjecture. Infinitely many twin primes could still exist, with their reciprocals adding up to a finite total, just as the reciprocals of the squares add up to a finite total even though there are infinitely many squares. What Brun proved is that the twins are thin, far thinner than the primes as a whole. They are a rare pattern inside a thinning sequence, and their rarity is now a theorem, even while their infinitude remains a guess.
9. The Bounded-Gaps Breakthrough: Zhang, Polymath, and 246
For most of the twentieth century, the twin prime conjecture looked untouchable. Mathematicians could not prove that prime pairs two apart occur infinitely often, and they could not prove it for any gap at all. Then, in 2013, an unknown lecturer at the University of New Hampshire named Yitang Zhang proved something nobody had managed before: there are infinitely many pairs of primes that differ by at most 70,000,000. The bound was enormous. The achievement was larger. For the first time in history, someone had proved that some fixed gap between primes occurs infinitely often.
Zhang's story is part of the result. He was fifty-eight, working as a lecturer, largely unknown outside a small circle, and he had been thinking about prime gaps for years. His paper appeared in the Annals of Mathematics in 2014, and the mathematics community recognised at once that it was a breakthrough. The bound of seventy million was not the point. The point was that a finite bound existed at all. Before Zhang, the best anyone could say was that the gap might grow without limit. After Zhang, the gap was capped, and the only question was how far the cap could be lowered.
Yitang Zhang, 2013: gaps of at most 70,000,000, infinitely often
The statement is precise. There are infinitely many pairs of primes, p and q, with q minus p less than or equal to 70,000,000. It does not say which gap occurs infinitely often. It does not say the gap is 2. It says that some gap up to seventy million occurs infinitely often, and it proves it. The proof used deep results about the distribution of primes in arithmetic progressions, and it filled a gap in the existing theory that specialists had thought was out of reach. Zhang found a way around it.
Think of it as a net. Before 2013, the net had holes of unbounded size: primes might, for all anyone could prove, drift arbitrarily far apart and never come back within any fixed distance. Zhang's net has a fixed mesh. Somewhere in the net, infinitely many pairs of primes sit within seventy million of each other. The mesh is coarse, but it is a mesh, and that changed the subject overnight.
From 70 million to 246
Within weeks of Zhang's paper, mathematicians around the world were lowering the bound. The Polymath8 project, a large open collaboration, took up the problem, building on ideas of James Maynard, and drove the bound down in stages: from seventy million to thousands, then to hundreds, and finally to 246. The peer-reviewed bound is still 246. There are infinitely many pairs of primes differing by at most 246. The twin prime conjecture needs the bound to reach 2. It stood at 246 for twelve years, because the methods that reached 246 run out of power before they reach 2 — and then, in late August and September 2026, a rush of preprints claimed to push it lower still (see below).
September 2026: preprints claim 240, 212, 186 and 182
In late August and September 2026, a rush of preprints claimed to push the bound lower still. Julia Stadlmann posted 240 on 31 August 2026, the first improvement in twelve years. Shiva Kintali, directing several AI models, reached 236 on 1 September. Axiom Math reached 212 on 3 September, with a Lean certificate of the deduction. OpenAI's GPT-6 Astra reached 186, in a report dated 30 August and released on 3 September. And GPT-6 Astra, prompted by Romyar Sharifi, reached 182, in a manuscript first posted on 4 September and revised on 18 September. All of them are preprints, and none had been peer-reviewed or independently verified as of November 2026. The Lean certificates behind the 212 and 186 claims take some analytic estimates as given rather than proving them end to end. The established bound — the one a textbook can state — is still 246, and the twin prime conjecture still needs 2.
The lesson of this section is one that What Is Probability makes in a different setting: a heuristic is not a proof. Everything about the primes suggests that gap 2 occurs infinitely often. The prime number theorem, Cramér's model of Section 14, and the sheer number of twin pairs found all point the same way. None of it is a proof. Zhang's achievement is a proof, and the peer-reviewed bound is still 246, and the distance from 246 to 2 is the distance between what mathematicians can show and what they believe. That distance is the most honest measure of the subject's difficulty.
10. Mersenne Primes and Perfect Numbers
Some primes have a special shape. A Mersenne prime is a prime of the form 2 raised to p, minus 1, where p is itself prime. The first few are 3, 7, 31, 127, 8,191 and 131,071, corresponding to p equal to 2, 3, 5, 7, 13 and 17. These numbers are named after Marin Mersenne, a French monk who lived from 1588 to 1648, though he did not prove any of them prime. The shape matters because numbers of this form can be tested for primality far faster than other numbers of the same size, and that speed is the reason every record prime of the modern era is a Mersenne prime.
One warning first. If 2 raised to n, minus 1, is prime, then n must be prime. But most prime exponents give composite Mersenne numbers. The smallest example is 2 raised to 11, minus 1, which is 2,047, and 2,047 is 23 times 89. Check: 23 times 89 is 2,047, since 23 times 90 is 2,070 and 23 less is 2,047. So the Mersenne shape is a hunting ground, not a guarantee. Most of the ground is empty. The prizes are rare, and they are worth hunting because of a connection to perfect numbers that is more than two thousand years old.
What a Mersenne prime is (2^p − 1)
The definition is short: a Mersenne prime is a prime of the form 2^p − 1 where p is prime. The reason the shape is useful is the Lucas–Lehmer test, a fast special test that works only for Mersenne numbers. Testing a general number with forty million digits for primality is a formidable task. Testing a Mersenne number of the same size is far faster, because the Lucas–Lehmer test exploits the shape. That is why the Great Internet Mersenne Prime Search, GIMPS, hunts only Mersenne numbers, and why the largest known prime is always a Mersenne prime in the modern era.
As of November 2026, exactly 52 Mersenne primes are known, and no new one has been found since October 2024. It is unknown whether there are infinitely many Mersenne primes. Euclid proved there are infinitely many primes. Nobody has proved there are infinitely many Mersenne primes, or finitely many. The list of 52 may be the beginning of an infinite list, or it may be most of a finite one. The search continues, and the next section describes the record it produced.
The Euclid–Euler theorem and perfect numbers 6, 28, 496, 8,128
A perfect number is a number equal to the sum of its proper divisors, the divisors other than itself. Six is perfect: its proper divisors are 1, 2 and 3, and 1 plus 2 plus 3 is 6. Twenty-eight is perfect: its proper divisors are 1, 2, 4, 7 and 14, and they add to 28. Four hundred and ninety-six is perfect, and 8,128 is perfect. These numbers look like curiosities. They are tied to Mersenne primes by a theorem in two halves, one ancient and one from Euler.
Euclid proved, circa 300 BCE, that if 2^p − 1 is prime, then 2^(p−1) times (2^p − 1) is a perfect number. Euler proved the converse in 1747: every even perfect number has this form. Together, the two halves give an exact one-to-one correspondence between even perfect numbers and Mersenne primes. Every Mersenne prime gives a perfect number, and every even perfect number comes from a Mersenne prime. Work the first five by hand. For p equal to 2: 2 times 3 is 6. For p equal to 3: 4 times 7 is 28. For p equal to 5: 16 times 31 is 496. For p equal to 7: 64 times 127 is 8,128. For p equal to 13: 4,096 times 8,191 is 33,550,336. Check the last: 8,191 times 4,096 is 8,191 times 4,000 plus 8,191 times 96, which is 32,764,000 plus 786,336, which is 33,550,336. The pattern holds exactly.
It is unknown whether any odd perfect numbers exist. None has ever been found, and none has been proved impossible. The even perfect numbers are fully understood. The odd ones may not exist at all.
p | Mersenne prime 2^p − 1 | Perfect number 2^(p−1) × (2^p − 1) |
|---|---|---|
2 | 3 | 6 |
3 | 7 | 28 |
5 | 31 | 496 |
7 | 127 | 8,128 |
13 | 8,191 | 33,550,336 |
17 | 131,071 | 8,589,869,056 |
19 | 524,287 | 137,438,691,328 |
31 | 2,147,483,647 | 2,305,843,008,139,952,128 |
GIMPS: volunteers, GPUs, and the hunt since 1996
GIMPS, the Great Internet Mersenne Prime Search, was founded in January 1996 by George Woltman. It is a distributed computing project: volunteers around the world run GIMPS software on their own computers, testing Mersenne numbers for primality, and the project coordinates the search. It has discovered the last 18 Mersenne primes. The GIMPS PrimeNet list is the authoritative record of the hunt, and it is where the current record prime is listed first.
The hunt changed in 2024, when the record prime was found not on an ordinary volunteer's computer but on cloud graphics processors, the first record found with GPUs rather than ordinary PCs, ending a 28-year run of PC-found records. The next section tells that story in full. The search itself goes on. Every exponent is checked, then double-checked, and the list of 52 may grow at any time. As of September to November 2026, not every exponent between the 51st Mersenne prime and the 52nd has been double-checked, so an undiscovered Mersenne prime could in principle sit between them. GIMPS reported all exponents below 136,279,841 checked at least once by 18 June 2025, and all exponents up to the 51st Mersenne prime verified by 4 September 2026. The ranking is provisional in that narrow sense, and the project is open about it.

11. The Largest Known Prime: 41,024,320 Digits
The largest known prime number is 2¹³⁶²⁷⁹⁸⁴¹ − 1, a Mersenne prime with 41,024,320 decimal digits. It is the 52nd known Mersenne prime, and as of November 2026 no newer record exists. The next-largest primes found in 2025 and 2026 are far smaller: the next best is a 13,426,224-digit generalised Fermat prime found on 12 October 2025. The record is not close to being broken. It is, by a wide margin, the largest prime anyone has ever found, and it was found by a volunteer running software on rented cloud computers.
The digit count can be checked. The number of digits of 2 raised to 136,279,841, minus 1, is the whole-number part of 136,279,841 times the base-10 logarithm of 2, plus 1. The logarithm of 2 is about 0.30103, so 136,279,841 times the base-10 logarithm of 2 is about 41,024,319.9, and the digit count is 41,024,320. The arithmetic confirms the published figure exactly.
M136279841 — what it is
The record prime is written M136279841, for Mersenne prime with exponent 136,279,841. It beats the previous record, 2⁸²⁵⁸⁹⁹³³ − 1, with 24,862,048 digits, found in December 2018, by 16,162,272 digits. Check the subtraction: 41,024,320 minus 24,862,048 is 16,162,272. The new record is more than sixteen million digits longer than the old one, a jump of about two thirds in length. The previous record had stood for almost six years. The one before it had stood for about a year. Records in this hunt arrive irregularly, sometimes in clusters, sometimes after long silences, and the gaps between them are part of the story.
Scale is hard to feel at forty-one million digits. Here is one way to feel it. A standard paperback novel has about 300,000 characters. The record prime has about 137 times that many digits. Printed in a book, it would fill about 137 volumes. Read aloud at two digits per second, without stopping, it would take about 237.4 days. Check: 41,024,320 digits divided by 2 is 20,512,160 seconds, and divided by 86,400 seconds in a day is about 237.4 days. That matches the published figure of 237 days. A single number, read aloud, would take most of a year.
What Is Pi gives a different kind of scale for comparison: pi's digits are known to trillions, but pi is not prime, and its digits are computed, not searched for. The record prime is different in kind. It is a single prime number, found by searching, and its forty-one million digits are all needed to write it down. There is no shorter description. That is what makes it a record, and what makes it useless for anything except the search itself, as Section 16 explains.
Luke Durant and the cloud GPUs, October 2024
The record prime was found on 12 October 2024 by Luke Durant, a GIMPS volunteer from San Jose, California. It was first flagged as probably prime on 11 October 2024 by an NVIDIA A100 graphics processor in Dublin, and confirmed on 12 October 2024 by an NVIDIA H100 in San Antonio, using a Lucas–Lehmer test. Independent verification concluded on 19 October 2024, and GIMPS announced the discovery on 21 October 2024. Durant ran GIMPS software on cloud GPUs across 24 data centres in 17 countries.
The detail matters because it marks a change in how the hunt works. For 28 years, every record prime had been found on an ordinary volunteer's personal computer. Durant's find was the first record found with graphics processors, the chips built for gaming and artificial intelligence, repurposed for number theory. The search had moved from spare computing cycles on home machines to rented cloud hardware, and the record jumped by sixteen million digits in a single step. The next record may come from the same cloud, or from a volunteer's machine, or from a machine nobody has built yet. The hunt does not care where the computing comes from. It cares only that the arithmetic is checked.
How long would it take to read it? (about 237 days)
The 237-day figure deserves a second look, because it is the kind of number that gets repeated without checking. At two digits per second, reading 41,024,320 digits takes 20,512,160 seconds. There are 86,400 seconds in a day. Dividing gives about 237.4 days of non-stop reading, no sleep, no pauses, no mistakes. At one digit per second, it would take about 475 days. At the pace of ordinary speech, slower still. The number is not merely large. It is large in a way that defeats the human voice, and that is the honest scale of the record. Forty-one million digits is not a number you read. It is a number you store, and the storage is the point: the prime exists as a file, verified by independent computation, and its size is the achievement.
12. How Prime Numbers Protect the Internet
Every time you log in to a bank, send a private message, or buy something online, prime numbers are standing between your secrets and anyone who wants them. The system that does this is called RSA. This section gives it exactly one paragraph of facts, because the full explanation belongs to the companion article on encryption, and the rest of the section is about the numbers around RSA: the key sizes, the tests that find the primes, and the quantum question.
RSA in one paragraph: 1977, two large primes, factoring is hard
RSA was publicly described in 1977 by Ron Rivest, Adi Shamir and Leonard Adleman at MIT, in a paper called "A Method for Obtaining Digital Signatures and Public-Key Cryptosystems". The public modulus in RSA is the product of two large secret primes, and the security of the system rests on the practical difficulty of factoring that product back into its two primes. Multiplying two large primes is fast. Factoring their product is, for numbers of the size used in practice, so slow that it is effectively impossible. That asymmetry, easy to multiply and hard to factor, is the whole foundation. For the full story of how RSA and other encryption work, read How Encryption Works.
Why 2,048-bit keys (up to 617 digits)
Modern RSA keys are typically 2,048 bits long. A 2,048-bit number has up to 617 decimal digits. Check: 2,048 times the base-10 logarithm of 2 is about 616.5, so the digit count is 617. The public modulus is the product of two primes of about 1,024 bits each, roughly 309 digits each. Factoring a 617- or 618-digit number that is the product of two primes of that size is far beyond any computer in existence. The largest RSA number publicly factored is RSA-896, an 896-bit number with 270 decimal digits, factored on 19 September 2026. Sixteen days earlier, on 3 September 2026, RSA-260, an 862-bit number with 260 digits, was factored. Both were factored with AI assistance, using GPU-adapted versions of the CADO-NFS factoring software. Before September 2026 the record had been RSA-250, an 829-bit number with 250 digits, factored in February 2020. RSA-896 is far smaller than a 2,048-bit key, and it still took a major effort. The gap between 270 digits and 617 digits is the safety margin the internet relies on.
How do we know a 309-digit number is prime in the first place, when we need one for a key? The answer is primality testing, and the tests come in three kinds. Fermat's little theorem, from the 1640s, says that if p is prime and a is not divisible by p, then a raised to p minus 1 leaves a remainder of 1 when divided by p. That gives a test, but some composite numbers, called pseudoprimes, pass it for many bases. The smallest is 561, which is 3 times 11 times 17, and it fools the Fermat test for many choices of base. The Miller–Rabin test is probabilistic: each run gives a probability, not a certainty, but repeating it with different bases drives the error probability down so far that it is negligible in practice, and it is what is used for generating RSA primes. The AKS test, published by Agrawal, Kayal and Saxena of IIT Kanpur on 6 August 2002, was the first test that is simultaneously general, deterministic, polynomial-time and unconditionally correct, needing no unproved hypothesis. Its authors won the 2006 Gödel Prize and Fulkerson Prize. In practice AKS is slower than Miller–Rabin and is not what cryptography uses. The practical world runs on probability, driven low enough to be safe.
Shor's algorithm (1994) and the quantum question
There is one known threat to RSA, and it has a name and a date. Peter Shor showed in 1994 that a sufficiently powerful quantum computer could factor numbers in polynomial time, which would break RSA. No quantum computer today can break a 2,048-bit key. The machines that exist are far too small and too error-prone, and the gap between what they can do and what Shor's algorithm needs is enormous. Whether that gap closes in ten years or fifty, or never, is an open question, and cryptographers are already building systems that would survive it. For now, the primes hold. The factoring problem that Euclid could not solve, that Gauss could not solve, and that no mathematician has solved in two thousand years, is still standing between your secrets and the world.

13. Primes in Nature: Cicadas, Sunflowers, and the Myths to Avoid
Prime numbers show up in nature, and they also show up in stories about nature that are not true. This section tells the two apart. The cicadas are real, and their prime-number life cycles are one of the strangest facts in biology. The sunflowers are also real, and the prime-number story told about them is false. The difference between the two cases is the difference between a verified fact and a good story that outran its evidence, and it is worth learning to spot.
The 13- and 17-year cicadas (Magicicada)
In eastern North America, periodical cicadas of the genus Magicicada spend almost their whole lives underground as nymphs, then emerge in vast numbers, sing, mate and die within a few weeks. The remarkable fact is the timing. They emerge after 13 or 17 years underground, and both numbers are prime. There are seven species, and the pattern is geographical: 13-year broods are generally southern, 17-year broods northern. In spring 2024, Brood XIX, a 13-year brood, and Brood XIII, a 17-year brood, co-emerged for the first time since 1803. They will not co-emerge again until 2245.
The arithmetic is exact. The least common multiple of 13 and 17 is 221, because 13 and 17 share no prime factors, so 13 times 17 is 221. Add 221 years to 2024 and you get 2245. The two broods coincide only once every 221 years, and the 2024 emergence was a once-in-two-centuries event. I followed the news of it from a distance, and what struck me was not the noise, though the noise was considerable, but the timing. Two clocks, one ticking every thirteen years and one every seventeen, had lined up for the first time since Napoleon was emperor, and they will not line up again until the twenty-third century. That is what prime cycles do. They meet rarely, because they share no divisor.
The same arithmetic explains why a prime cycle meets a short predator cycle less often than a composite cycle would. A predator on a 2-year cycle meets a 13-year cicada brood once every 26 years, the least common multiple of 13 and 2. A predator on a 5-year cycle meets a 17-year brood once every 85 years. A 12-year cicada, by contrast, would meet a 2-year predator every 12 years, a 3-year predator every 12 years, and a 4-year predator every 12 years, because 12 shares factors with all of them. Prime cycles are hard to synchronise with. That is the mathematical heart of the story, and it is solid. What is not solid is why the cicadas evolved this way, which is the next subsection.
The predator-avoidance hypothesis — and why it is still a hypothesis
The leading explanation for the prime cycles is predator avoidance, formally proposed by Lloyd and Dybas in 1966 and popularised by Stephen Jay Gould in 1977. The argument has two parts. First, prime cycles rarely coincide with shorter predator cycles, as the arithmetic above shows, so predators cannot build their own life cycles around the cicadas. Second, the cicadas emerge in overwhelming numbers, over 1.5 million per acre, so predators eat their fill and the survivors still number in the millions. That is predator satiation: safety in numbers so large that no predator can eat them all. A second hypothesis is hybridisation avoidance between broods, keeping the 13-year and 17-year populations from merging.
All of this is a hypothesis, not a settled fact, and the draft of this article must say so plainly. No periodic predator with a matching multi-year cycle has ever been identified. Competing explanations, including climate-driven selection on development time, remain live. The predator-avoidance story is elegant, it fits the arithmetic, and it may be right. But elegance is not evidence, and a hypothesis that has not been tested against a real predator is still a hypothesis. The honest statement is this: cicadas emerge on 13- and 17-year cycles, both prime, and the leading explanation is predator avoidance, proposed in 1966 and still unproven. Anything stronger overstates what is known.
Sunflowers: Fibonacci, not primes (myth-busting)
Now the myth. You may have read that sunflowers use prime numbers, or that the spirals in a sunflower head count out to primes. That claim is false, and it is worth debunking directly, because it appears in low-quality content and it sounds plausible. Here is what sunflowers actually do. Each new seed in a sunflower head is placed about 137.5 degrees from the last, the golden angle, which is 360 degrees times one minus one over phi, about 137.50776 degrees. The spiral arms you can count in the head come in consecutive Fibonacci numbers, commonly 34 and 55, or 55 and 89. This is about the golden ratio and Fibonacci numbers, not about prime numbers. There is no verified claim that sunflower spiral counts are prime, and about a quarter of sunflowers in a citizen-science study did not even show Fibonacci spiral counts.
The confusion is understandable, because the golden angle and the Fibonacci numbers are real mathematics in a real flower, and primes are real mathematics too, and it is easy to blur them into one story. But the packing of seeds is a Fibonacci story. The golden ratio explains it, and the golden ratio article on this site works through the angle and the spirals in full. If you see a sunflower, count the spirals, and you will find Fibonacci numbers. You will not find primes, because the flower is not using them. A myth debunked is a small victory for accuracy, and this article claims it plainly: sunflowers use Fibonacci numbers and the golden angle, not prime numbers.
14. Prime Gaps, the Ulam Spiral, and Prime Races
Primes thin out as numbers grow, but they do not thin out evenly. Sometimes they crowd together. Sometimes they vanish for long stretches. This section measures the unevenness: the gaps between consecutive primes, a spiral pattern found by doodling, a quadratic that produces forty primes in a row, and a race between two kinds of primes that one side has been winning for almost all of history. The primes are not random, and they are not regular. They live in the space between those two descriptions, and that space is where the subject gets strange.
How far apart can primes get? (largest maximal gap 1,854, May 2026)
A prime gap is the difference between two successive primes. The first gaps are 1, from 2 to 3, the only odd gap, then 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, and so on. The first gap larger than 14 is 18, between 523 and 541. Check: 541 minus 523 is 18, and there is no prime between them. Gaps grow as numbers grow, roughly in step with the natural logarithm, and the record gaps are tracked like sporting records.
As of May 2026, the largest known maximal prime gap has length 1,854, found by Robert Smith. It is the 85th maximal gap, and it occurs after the prime 101,412,319,996,363,309,069. A maximal gap is a gap larger than every gap before it, so each one sets a new record for the longest wait. An earlier snapshot from November 2025 listed 1,676, and that figure is now out of date. The largest known prime gap overall, with probable-prime endpoints, has length 16,045,848, with 385,713-digit probable primes, found by Andreas Höglund in March 2024. The largest with proven-prime endpoints is 1,113,106, with 18,662-digit primes, found by P. Cami, M. Jansen and J. K. Andersen. The numbers are large and the gaps are long, but the pattern is the same as at the start: primes arrive irregularly, and the waits get longer as the numbers grow.
Cramér's model: gaps grow like (ln x) squared
In 1936 and 1937, Harald Cramér proposed a model for the gaps. Treat each integer n as prime with probability 1 over ln n, independently, as if primality were decided by a coin toss weighted by the local density. The model predicts that the largest gap below x is about the square of ln x. It is a heuristic model, not a theorem, and the corresponding conjecture, that the largest gap is about the square of ln x, is unproved. But the model works well as a guide. It predicts the right order of magnitude for the record gaps, and it is the reason mathematicians expect gaps to grow slowly, like the square of a logarithm, rather than exploding.
The model also connects back to the probability language of What Is Probability. Cramér's model is probabilistic thinking applied to the primes: not a claim that primes are random, but a tool for guessing what a random-looking sequence with the right density would do. The primes are not random. They are determined completely by arithmetic. But at large scales they behave enough like a random sequence with density 1 over ln x that the model predicts their gaps well. That resemblance, between a deterministic sequence and a random one, is one of the deepest facts in the subject, and it is still not fully understood.
The Ulam spiral (1963) and Euler's n squared + n + 41
In 1963, Stanislaw Ulam was sitting through a boring lecture, doodling, when he wrote the integers in a square spiral and marked the primes. The primes clustered along diagonal lines. He checked the pattern on the MANIAC computer at Los Alamos, out to 65,000, and the diagonals were still there. The pattern is real, but it is not a secret formula for primes. The diagonals correspond to quadratic polynomials of the form 4n squared plus bn plus c, and some quadratics are much richer in primes than others. The spiral shows a known bias in prime-producing quadratics, drawn as a picture. It does not predict primes. It displays them.
The most famous prime-rich quadratic is Euler's: n squared plus n plus 41. It is prime for every n from 0 to 39, forty consecutive prime values. It fails at n equal to 40, giving 1,681, which is 41 squared. Check: 40 squared is 1,600, plus 40 is 1,640, plus 41 is 1,681, and 41 times 41 is 1,681. The failure is built into the formula. At n equal to 41, the value is 41 times 43, and the pattern is over. No quadratic can produce primes forever, and Euler's is the most famous of its kind, forty primes before it breaks. The Ulam spiral is the picture of that richness, and Euler's quadratic is its most famous example.

Chebyshev's bias: 3 mod 4 leads about 99.59 percent of the time
There is one more pattern, and it is the strangest of all. Divide the primes by their remainder when divided by 4. An odd prime leaves a remainder of 1 or 3. Chebyshev noticed in 1853 that the primes leaving remainder 3 outnumber the primes leaving remainder 1, persistently, for as far as anyone counted. Dirichlet's theorem, from 1837, says both classes contain infinitely many primes, in equal density in the limit, so the bias cannot last forever. But it lasts for a very long time. Rubinstein and Sarnak computed in 1994 that, assuming the Generalised Riemann Hypothesis and a linear-independence hypothesis, the 3 mod 4 primes lead for about 99.59 percent of x, a logarithmic density of 0.9959. The first exception, where the 1 mod 4 primes briefly take the lead, occurs at x equal to 26,861, found by Leech in 1957.
Read that again. One team of primes leads for 99.59 percent of the number line, and the lead changes hands for the first time only after 26,861. The bias is in the fluctuation, not the final count. In the limit the two classes are equal, but the road to equality is almost entirely one-sided. It is a reminder that the primes have structure at every scale, and that the structure is often invisible until someone counts far enough to see it. Chebyshev counted far enough. The race is still running.
15. The Great Unsolved Problems: Goldbach, Riemann, and Friends
This article has proved some things and left others open. Euclid proved the primes never end. Gauss's guess about their distribution took a century to become a theorem. Zhang proved a finite bound on prime gaps, and the bound fell to 246. But two of the oldest questions in the subject are still unanswered, a third was settled in five years, and a cousin of the first took nearly three centuries to fall. The open problems are not a footnote to the subject. They are the subject's frontier, and they are the reason mathematicians still care about numbers first studied before the invention of algebra. The infinity article on this site frames open problems the same way: the unknown is not a failure of mathematics, it is the work mathematics exists to do.
Goldbach's conjecture (1742): every even number above 2 is two primes
In a letter to Leonhard Euler on 7 June 1742, Christian Goldbach proposed that every even integer greater than 2 is the sum of two primes. Euler restated it in the modern form, and it has been open ever since. The examples are easy to check. Four is 2 plus 2. Twenty-eight is 11 plus 17. One hundred is 3 plus 97. Try it with any even number you like, and you will find a pair. The conjecture has been verified computationally for every even integer up to 4 times 10 to the power 18, in work by Oliveira e Silva, Herzog and Pardi published in 2014, with the computation completed in 2012. That is a vast range, and it proves nothing. A counterexample could in principle sit just beyond the checked range, and checking is not proving.
Do not confuse the strong conjecture with its weaker cousin, which is proved. Every odd number greater than 5 is the sum of three primes. Vinogradov proved that for all sufficiently large odd numbers in 1937, and Harald Helfgott closed the remaining gap in 2013. The weak Goldbach conjecture is a theorem. The strong one, two primes for every even number above 2, is still a guess, and it has survived every attempt to prove it for 284 years. The difference between the two is the difference between a problem that yielded and a problem that has not, and the strong version is the one that still carries Goldbach's name. Several preprints have claimed proofs of Goldbach's conjecture, including one with 'definitive proof' in its title. None is peer-reviewed or accepted, and the conjecture remains open as of November 2026.
Bertrand's postulate: always a prime between n and 2n
Not every great conjecture stays open. Joseph Bertrand conjectured in 1845 that there is always a prime between n and 2n, for every n greater than 1, and he verified it up to 3,000,000. Chebyshev proved it — the proof is dated to 1850, though the memoir was published in 1852, so the honest wording is that it was proved by Chebyshev in 1850 and published in 1852. Ramanujan gave a simpler proof in 1919, and Paul Erdős gave an elementary proof in 1932, at the age of 19. Chebyshev also showed, in the same work, that the prime count pi(x) stays within about 10 percent of x divided by ln x for large x, the first real progress toward the prime number theorem. What was a guess in 1845 is a theorem now, and it has a practical consequence: however far out you go, the next prime is never more than a doubling away. The gap between a number and the next prime is always less than the number itself.
Bertrand's postulate matters here because it shows what a solution looks like. A conjecture becomes a theorem when someone finds the argument, and the argument for Bertrand's postulate used only tools that already existed. The open problems below may fall the same way, to an argument nobody has found yet, or they may need mathematics that does not exist yet, as the prime number theorem did. Either way, Bertrand's postulate is the proof that the frontier moves.
The Riemann hypothesis (1859): ten trillion zeros, no proof, one million US dollars
The most famous open problem in mathematics is the Riemann hypothesis, proposed by Bernhard Riemann in 1859 in his only number-theory paper, eight pages long. It states that all the non-trivial zeros of the Riemann zeta function have real part one half — that they lie on a single vertical line, the critical line. The Clay Mathematics Institute, which named it one of its seven Millennium Prize Problems in 2000, frames the stakes in a single sentence:
The prime number theorem determines the average distribution of the primes. The Riemann hypothesis tells us about the deviation from the average. — Clay Mathematics Institute, Riemann Hypothesis problem description
The hypothesis has been checked for the first ten trillion zeros, all on the critical line, in work by Xavier Gourdon completed in 2004. The first three non-trivial zeros sit at heights of about 14.13, 21.02 and 25.01 on the critical line. Hardy proved in 1914 that infinitely many zeros lie on the line, and Conrey showed in 1989 that at least 40 percent of them do. None of that is a proof. A proof must cover every zero, not the first ten trillion, and the gap between ten trillion checked and all of them is the gap between evidence and certainty.
The prize is one million US dollars for a correct solution, offered by the Clay Mathematics Institute for each of its seven Millennium Prize Problems. The Poincaré conjecture is the only one solved so far, by Grigori Perelman, who declined the prize in 2010. If the Riemann hypothesis is true, it would give a far better error estimate for the prime number theorem, showing that the difference between the true count pi(x) and the logarithmic integral Li(x) is of the order of the square root of x times log x, a result shown by von Koch in 1901. Hilbert included the hypothesis as problem 8 of his 23 problems in 1900, and it has outlasted every attempt since. A claimed proof by Michael Atiyah in 2018 was not accepted — experts found flaws — and the hypothesis remains open as of November 2026. It is the deepest open question about the primes, and it has been open for 167 years.
16. Misconceptions About Prime Numbers — and What Is True Instead
This section collects the misconceptions this article has corrected along the way, in one place, so that a reader who arrives with any of them can leave without it. Each item states the misconception, the correction, and the verified fact behind it, with a cross-reference to the section where it is proved. No new claims are made here. Everything below was established earlier in the article.
"1 is prime" — false; it has one divisor
One has exactly one positive divisor, itself, and a prime must have exactly two. More importantly, making 1 prime would break unique factorisation: 6 would be 2 times 3, and 1 times 2 times 3, and 1 times 1 times 2 times 3, with no end. The exclusion of 1 is a deliberate choice that keeps the fundamental theorem of arithmetic true. See Section 2.
"Euclid's product-plus-one is always prime" — false; 30,031 = 59 × 509
Euclid's construction guarantees a new prime factor, not a new prime number. Multiply the first six primes and add 1, and you get 30,031, which is 59 times 509 — composite. The first five primes do give a prime, 2,311, which is why the misstatement is so persistent. The pattern holds five times and breaks at the sixth. See Section 4.
"There is a formula that generates all primes" — false; no simple formula is known
No simple formula is known that generates all the primes, or that produces the next prime on demand. The closest thing to a prime-generating formula, Euler's n squared plus n plus 41, produces forty primes in a row and then fails at n equal to 40, giving 1,681, which is 41 squared. A formula that works forty times and then breaks is not a formula for the primes. It is a curiosity, and the primes have resisted every attempt to capture them in a single expression. See Section 14.
"Sunflowers use prime numbers" — false; Fibonacci and the golden angle, not primes
Sunflower heads place each new seed about 137.5 degrees from the last, the golden angle, and the spiral arms count out to consecutive Fibonacci numbers, commonly 34 and 55, or 55 and 89. There is no verified claim that sunflower spiral counts are prime. The flower is doing Fibonacci packing, not prime arithmetic, and the prime version of the story is a myth that outran its evidence. See Section 13.
"The largest prime has been found" — false; Euclid proved there is no largest prime
There is a largest KNOWN prime, 2 to the power 136,279,841 minus 1, with 41,024,320 digits, found in October 2024. There is no largest prime. Euclid proved more than two thousand years ago that the primes never end, so the record will fall, as every record before it has fallen. The PrimePages list of the largest known primes is updated as new primes are found, and the current record sits at its top. See Sections 4 and 11.
"Checking billions of cases proves Goldbach or Riemann" — false; verification is not proof
Goldbach's conjecture has been verified for every even integer up to 4 times 10 to the power 18. The Riemann hypothesis has been checked for the first ten trillion zeros. Neither is proved. A counterexample to Goldbach could sit beyond the checked range, and a zero off the critical line could sit beyond the ten trillion checked. Verification builds confidence. It does not build certainty. Only a proof does that, and neither problem has one. See Section 15.
"Big primes make encryption stronger" — false; million-digit primes are not used in RSA
Finding larger prime numbers is sometimes presented as a means to stronger encryption, but this is not true. Real RSA uses primes of about 309 digits each, and primes with millions of digits are not used in cryptography at all. The record prime, with its 41,024,320 digits, is useless for encryption, as Section 11 says plainly: it exists to be searched for, not to be used. Bigger primes do not make the internet safer. The right primes, at the right size, do. See Sections 11 and 12.
17. Frequently Asked Questions
What is a prime number?
A prime number is a natural number greater than 1 whose only positive divisors are 1 and itself. The first primes are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29, and 2 is the only even prime. See Section 1.
Why is 1 not a prime number?
One has only one positive divisor, itself, while a prime must have exactly two. More importantly, calling 1 prime would break unique factorisation, since any number could then be written with any number of ones thrown in. See Section 2.
Why do prime numbers matter?
Because every whole number greater than 1 is either prime or a unique product of primes, so primes are the atoms of arithmetic. They also guard the internet through RSA, appear in the life cycles of cicadas, and carry some of the deepest unsolved problems in mathematics. See Sections 3, 12 and 13.
How do prime numbers protect the internet?
RSA encryption multiplies two large secret primes, each about 309 digits, into a public modulus. Multiplying is fast, but factoring the product back into its two primes is so slow that it is effectively impossible, and that asymmetry is what keeps online secrets safe. See Section 12.
What is the largest known prime number?
As of November 2026 it is 2 to the power 136,279,841 minus 1, a Mersenne prime with 41,024,320 digits, found on 12 October 2024 by Luke Durant through GIMPS. No newer record exists. See Section 11.
Are there infinitely many prime numbers?
Yes. Euclid proved it around 300 BCE, in Proposition 20 of Book IX of the Elements: given any finite list of primes, you can always build a new prime that is not on it. See Section 4.
What are twin primes?
Twin primes are pairs of primes that differ by 2, such as (3, 5), (11, 13) and (29, 31). The largest known pair has 388,342 digits in each member and was found in September 2016. Whether there are infinitely many twin primes is still unproved. See Section 8.
Is the Riemann hypothesis solved?
No. It has been checked for the first ten trillion zeros, all on the critical line, but no proof exists as of November 2026. It carries a prize of one million US dollars from the Clay Mathematics Institute. See Section 15.
18. Conclusion
Prime numbers began this article as a classroom exercise, crossing out the numbers that could be split apart, and they end it as the atoms of arithmetic: indivisible, inexhaustible, and still mysterious after more than two thousand years of study. What is known is now a settled landscape. The primes are infinite, proved by Euclid. They thin out according to the prime number theorem, proved in 1896. They can be found by sieve, counted by formula, and used to guard the internet. What is unknown is just as definite. The twin primes may or may not go on forever. Goldbach's conjecture may or may not hold for every even number. The Riemann hypothesis may or may not be true, and a million US dollars waits for whoever settles it.
I first met the primes on a classroom board, crossing out composites until only a stubborn few were left. What I did not know then, and what this article has tried to show, is that the stubborn few are not a curiosity at the edge of arithmetic. They are arithmetic. Every integer is built from them, every secret on the internet is guarded by them, and every open problem in the subject is a question about them. The primes never run out, and neither, for now, do the questions they ask.
19. Sources
MacTutor History of Mathematics, University of St Andrews — Prime Number (glossary)
Mathematics LibreTexts — Elementary Number Theory: Prime Numbers
Wikipedia — Euclid's theorem
Encyclopaedia Britannica — Eratosthenes
Wikipedia — Prime-counting function
Wikipedia — Prime number theorem
Wikipedia — Twin prime
PrimePages — The Top Twenty Twin Primes
Wikipedia — Mersenne prime
Wikipedia — List of Mersenne primes and perfect numbers
Wikipedia — Largest known prime number
PrimePages — The Largest Known Primes: A Summary
BBC Science Focus — This latest record-breaking prime number takes 237 days to read
Wikipedia — RSA cryptosystem
PrimePages — Primality Proving
Wikipedia — AKS primality test
Wikipedia — Periodical cicadas
Alexander Tutoring — Fibonacci Sequence in Nature
Wikipedia — Prime gap
MacTutor History of Mathematics, University of St Andrews — Ulam spiral
Wikipedia — Bertrand's postulate
Miniwebtool — Goldbach Conjecture Verifier
Clay Mathematics Institute — Riemann Hypothesis
Wikipedia — Millennium Prize Problems
