What Is the Largest Known Prime Number — And Why Do Mathematicians Keep Searching?

Photo: Jan van der Wolf / Pexels
The largest known prime number is 2^136,279,841 − 1, a number with 41,024,320 decimal digits. It was flagged as a probable prime by an NVIDIA A100 graphics card in Dublin on October 11, 2024, confirmed the next day on an NVIDIA H100 in San Antonio, and announced on October 21 by the Great Internet Mersenne Prime Search (GIMPS). Nobody will ever read it, and no calculation needs it. So why do people spend a year and millions of dollars finding such things?
Key takeaways
- A prime number is an integer greater than 1 whose only positive divisors are 1 and itself.
- The record is the 52nd known Mersenne prime, 2^136,279,841 − 1, found by Luke Durant (per GIMPS). It beat the previous record by more than 16 million digits.
- Primes never run out. Euclid proved around 300 BC that there are infinitely many, so "largest prime" always means "largest known prime."
- Record hunters search Mersenne numbers, which have the form 2^p − 1, because a fast special-purpose test exists for them.
- Modern encryption relies on products of primes, but record-sized Mersenne primes play no part in it.
What a prime number is
A prime is an integer greater than 1 that has no positive divisors except 1 and itself. The first few are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. Two is the only even prime, since every larger even number is divisible by 2. A number greater than 1 that is not prime is called composite.
Primes matter because of what the Fundamental Theorem of Arithmetic says: every integer greater than 1 can be written as a product of primes in exactly one way, apart from the order of the factors. So 12 is 2 × 2 × 3 and nothing else, and 100 is 2 × 2 × 5 × 5. The uniqueness is the important part. In that sense primes are the atoms of arithmetic. Chemists can build any molecule from a short list of elements; number theorists can build any integer from the list of primes.
The analogy has a limit, though. The periodic table is finite and has a tidy layout. The list of primes is infinite, and its layout has resisted every attempt to find a simple rule. That combination of rigid structure and apparent randomness is a large part of the appeal.
Why there is no largest prime
Euclid of Alexandria proved that the primes are infinite around 300 BC. His argument is short enough to follow in a few lines.
- Suppose there were only finitely many primes, and call them p₁, p₂, up to pₙ.
- Multiply them all and add 1: N = (p₁ × p₂ × ... × pₙ) + 1.
- Dividing N by any prime on the list leaves remainder 1, so no prime on the list divides N.
- But N is either prime itself or has a prime factor. Either way there is a prime that is not on the list.
- That contradicts the assumption, so the list could never have been complete.
A common misreading is that the number N must itself be prime. It need not be. Take the first six primes: 2 × 3 × 5 × 7 × 11 × 13 + 1 = 30,031. That is 59 × 509, a composite number, but both of its prime factors are new. The proof only needs a prime that is missing from the list, not a prime that is the product plus one.
So when headlines announce "the largest prime number," what they mean is the largest prime that anyone has proven prime. There is always a bigger one somewhere. The hunt is for the frontier of what we can verify, not the end of a list.
How rare primes get as numbers grow
Primes thin out. Below 30 there are 10 of them, about one in three numbers. Below one million there are 78,498. The Prime Number Theorem, proved independently by Jacques Hadamard and Charles de la Vallée Poussin in 1896, says how the thinning works: the number of primes up to x is approximately x divided by the natural logarithm of x.
The approximation improves as x grows. These values come from the Wikipedia article on the theorem; the ratio column is a calculation from them.
| x | Primes up to x | x / ln x | Actual ÷ estimate |
|---|---|---|---|
| 1,000 | 168 | about 144.8 | about 1.161 |
| 1,000,000 | 78,498 | about 72,382 | about 1.084 |
| 1,000,000,000 | 50,847,534 | about 48,254,942 | about 1.054 |
A rough consequence is that near a number N, about one integer in ln N is prime. For a number the size of the current record, ln N is about 94 million (136,279,841 multiplied by ln 2, which is about 0.693). So a random integer that large has roughly a one in 94 million chance of being prime. Testing random candidates of that size would be hopeless. That is the reason record hunters look for numbers of a special form instead.
Mersenne primes: numbers with a shortcut
A Mersenne number is a number of the form 2^p − 1, where p is a positive integer. It is named after Marin Mersenne, a French friar who studied them in the 1600s. The first few with prime exponents are easy to check by hand: 2² − 1 = 3, 2³ − 1 = 7, 2⁵ − 1 = 31, and 2⁷ − 1 = 127 are all prime.
A Mersenne number can only be prime if its exponent p is itself prime. But the converse fails. The first counterexample is 2¹¹ − 1 = 2,047, which equals 23 × 89. Mersenne's 1644 list of exponents (2, 3, 5, 7, 13, 17, 19, 31, 67, 127, and 257) contained two errors: M67 and M257 are composite, and he missed M61, M89, and M107, which are prime (per the Mersenne prime article). It took centuries and, eventually, computers to sort the list out.
Mersenne primes also connect to a much older puzzle. A perfect number equals the sum of its proper divisors: 6 = 1 + 2 + 3 and 28 = 1 + 2 + 4 + 7 + 14. Euclid showed that if 2^p − 1 is prime then 2^(p−1) × (2^p − 1) is a perfect number, and Euler proved the converse for even perfect numbers. Each Mersenne prime therefore yields exactly one even perfect number, and vice versa. Whether any odd perfect number exists is unknown, and so is whether the set of Mersenne primes is finite or infinite.
The Lucas-Lehmer test
The shortcut that makes Mersenne numbers searchable is the Lucas-Lehmer test. For an odd prime p, start with s = 4 and repeat the step "square it, subtract 2, and take the remainder modulo 2^p − 1," exactly p − 2 times. The Mersenne number is prime if and only if the final value is 0.
Here is the test run by hand on 2⁷ − 1 = 127, which needs five steps:
| Step | Calculation | Result modulo 127 |
|---|---|---|
| Start | s₀ | 4 |
| 1 | 4² − 2 = 14 | 14 |
| 2 | 14² − 2 = 194 | 67 |
| 3 | 67² − 2 = 4,487 | 42 |
| 4 | 42² − 2 = 1,762 | 111 |
| 5 | 111² − 2 = 12,319 | 0 |
The final value is 0, so 127 is prime. The same recipe applied to 2¹¹ − 1 gives a nonzero result, and 2,047 is shown to be composite without ever finding its factors. The test is a yes-or-no answer that does not require factoring, which is why it works at scales where factoring is impossible.
The cost of the test for a large exponent is p − 2 squarings of numbers that are themselves p bits long. For the record exponent, that is about 136 million squarings of a 136-million-bit number. Programs use fast Fourier transform multiplication so that each squaring costs far less than the schoolbook method would. Think of it as a very long relay race: each leg is a huge multiplication, and a single error anywhere ruins the final answer.
A short history of the record
Before computers, the hunt was done by hand and by mechanical calculator. Édouard Lucas proved the 39-digit M127 prime in 1876, and it held the record into the electronic era. In 1951, Aimé Ferrier found a 44-digit prime with a mechanical calculator, and soon afterward J. C. P. Miller and D. J. Wheeler found a 79-digit one on the EDSAC computer. In 1952, Raphael Robinson found five new Mersenne primes in a single year on the SWAC computer.
The table below shows selected record holders from the list of record primes.
| Year | Prime | Digits | Found by |
|---|---|---|---|
| 1876 | 2¹²⁷ − 1 | 39 | Édouard Lucas |
| 1952 | 2²²⁸¹ − 1 | 687 | Raphael Robinson |
| 1963 | 2¹¹²¹³ − 1 | 3,376 | Donald Gillies |
| 1979 | 2⁴⁴⁴⁹⁷ − 1 | 13,395 | David Slowinski and Harry Nelson |
| 1996 | 2¹³⁹⁸²⁶⁹ − 1 | 420,921 | GIMPS, Joel Armengaud |
| 1999 | 2⁶⁹⁷²⁵⁹³ − 1 | 2,098,960 | GIMPS, Nayan Hajratwala |
| 2008 | 2⁴³¹¹²⁶⁰⁹ − 1 | 12,978,189 | GIMPS, Edson Smith |
| 2013 | 2⁵⁷⁸⁸⁵¹⁶¹ − 1 | 17,425,170 | GIMPS, Curtis Cooper |
| 2018 | 2⁸²⁵⁸⁹⁹³³ − 1 | 24,862,048 | GIMPS, Patrick Laroche |
| 2024 | 2¹³⁶²⁷⁹⁸⁴¹ − 1 | 41,024,320 | GIMPS, Luke Durant |
Two patterns stand out. First, almost every record since the 1950s has been a Mersenne prime; the last non-Mersenne record, a 65,087-digit prime found in 1989 by a team calling itself the "Amdahl Six," is the exception. Second, the gaps between records vary widely. The jump from 2018 to 2024 was about six years and more than 16 million digits, the biggest leap of the GIMPS era.
How GIMPS searches
George Woltman founded GIMPS in January 1996 and wrote its Prime95 software. It is a volunteer distributed computing project: the server hands out exponents to test, participants' computers run the work, and results are sent back. According to the GIMPS article, the project had found 18 Mersenne primes as of October 2024, 16 of them record holders at the time.
The workflow for each candidate exponent has several stages, each designed to throw out composites as cheaply as possible.
- Trial factoring. Search for small factors. Any Mersenne number 2^p − 1 with a prime exponent has factors of a special form, so the search can skip almost every candidate divisor. This step is done heavily on GPUs.
- P−1 and similar factoring methods. Further algorithms try to find larger factors that trial factoring missed.
- A primality test. Since 2018, GIMPS has run a Fermat probable-prime (PRP) test, protected by an error-checking method devised by Robert Gerbicz. The check lets the project be more than 99.999 percent sure a result was computed correctly. Lucas-Lehmer tests remain the definitive check; first-time Lucas-Lehmer tests were deprecated in April 2021 and the test is now used to confirm probable primes.
- Independent verification. A candidate must be confirmed by definitive tests on different software and hardware before it is announced.
What happened in October 2024
Luke Durant, who lives in San Jose, California, had been contributing to GIMPS since October 2023. Rather than relying on a handful of home computers, he assembled what the project calls a "cloud supercomputer" of thousands of server GPUs spread across 24 data center regions in 17 countries. He had been testing for nearly a year (per the GIMPS announcement). The Wikipedia entry on record primes reports that the search cost about $2 million.
On October 11, an NVIDIA A100 GPU in Dublin, Ireland, flagged the exponent 136,279,841 as a probable prime. On October 12, an NVIDIA H100 GPU in San Antonio, Texas, completed a Lucas-Lehmer test that confirmed primality, and that date is the official discovery date. Over the following week, other definitive tests ran on different programs and hardware: Prime95 on Intel CPUs, PRPLL/GpuOwl on AMD and NVIDIA GPUs, Mlucas on an Intel CPU (confirmed October 19), and CUDALucas on an NVIDIA GPU. The result was announced on October 21, 2024. It was the first GIMPS prime found with a PRP test.
Two details in older accounts of this discovery are worth correcting. The prime was not found by one person working for years on a single machine, and it did not take years to verify. The search stretched over about a year, and independent confirmation took days.
The finished number has 41,024,320 digits, more than 16 million digits longer than the 2018 record, which had 24,862,048. Printing it in full would take thousands of pages, which is one reason the project publishes the exponent and the digit count rather than the number.
Why the record primes are not used in encryption
This is the confusion that surrounds most record announcements. Prime numbers do protect most of the internet. But the primes that protect it are not these primes.
RSA, published in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman, rests on an asymmetry. Multiplying two large primes is easy. Recovering the primes from their product is, for classical computers, not feasible at the sizes used. A toy example makes the structure visible: 61 × 53 = 3,233 is trivial to compute, but if you were only handed 3,233 you would have to search for the factors. With 61 and 53 that is easy. With two primes of about 1,024 bits each (roughly 309 decimal digits each) multiplied into a 2,048-bit modulus, no known classical method finishes in practical time.
A record Mersenne prime is useless for this for several reasons.
- It is public. The security of RSA depends on the two primes being secret. A prime that has been published in a press release is the opposite.
- It is wrongly shaped. Cryptographic primes should look random. A prime of the form 2^p − 1 has a rigid structure that an attacker could exploit.
- It is far too large. Keys of this size would make every handshake take impractically long. Practical key sizes are a few thousand bits, not 136 million.
- Everyday cryptography needs many fresh primes. Systems generate new random primes constantly, and a handful of record primes would be reused and trivially guessed.
So the connection to cryptography is indirect. The research behind record primes advances multiplication algorithms, error detection, and primality testing, which are the same tools cryptographers need. For how encryption works more generally, see the encryption explainer.
The quantum caveat
Prime factoring is the weak spot that quantum computers target. Peter Shor published an algorithm in 1994 that, on an ideal large quantum computer, would factor numbers in polynomial time and so break RSA (Shor's algorithm). Laboratory demonstrations so far have factored only very small numbers such as 15 and 21, and several of those demonstrations have been criticized for simplifying the algorithm.
Estimates of what a real attack would need keep falling. In May 2025, Craig Gidney of Google Quantum AI estimated that a 2048-bit RSA integer could be factored in under a week by a quantum computer with fewer than one million noisy qubits, down from an estimate of 20 million qubits in 2019 (arXiv:2505.15917). No machine like that exists. On August 13, 2024, the US National Institute of Standards and Technology released its first three finalized post-quantum encryption standards, FIPS 203, 204, and 205, built on different mathematical problems that are not expected to fall to quantum attacks (NIST). For the wider picture, see how quantum computers actually work and what would happen if quantum computers broke all modern encryption.
So why keep looking?
If the number has no practical use, what justifies the effort? Mathematicians give several reasons, some more convincing than others.
It tests the machinery. A primality test on a 41-million-digit number exercises multiplication algorithms, memory systems, and error checking to the limit. The Gerbicz error check that GIMPS adopted is a good example of a method developed because long computations go wrong. A single flipped bit in a multi-week computation can ruin the result, so the field has put real effort into detecting it.
It tests conjectures. Heuristic arguments, such as the Lenstra-Pomerance-Wagstaff conjecture, predict how often Mersenne primes should appear: on average about 5.92 primes p with n decimal digits should give a Mersenne prime. Each new find is a data point for or against such models. The conjecture also predicts there are infinitely many Mersenne primes, but this remains unproven.
It counts as exploration. There is also the plainer motive. People climb mountains because they are there, and the search for primes is a kind of exploration of a territory that exists independent of anyone. A project that has operated since 1996 with hundreds of thousands of volunteers shows that the curiosity is real.
There are prizes. The Electronic Frontier Foundation offers Cooperative Computing Awards. A $50,000 award for the first one-million-digit prime was paid in April 2000, and a $100,000 award for the first ten-million-digit prime in October 2009. Two more awards are listed on the EFF page with no award date: $150,000 for a 100-million-digit prime and $250,000 for a one-billion-digit prime. At the current pace, the next big threshold is still a long way off. The record is a little over 41 million digits, and the next prize needs a prime more than twice that size.
The deeper puzzles
Primes also sit at the center of several problems that remain open.
The Riemann Hypothesis
In 1859, Bernhard Riemann linked the distribution of primes to the zeros of a function now called the Riemann zeta function. The Riemann Hypothesis states that all the nontrivial zeros of this function have real part exactly one half, which places them on a single vertical line in the complex plane. According to the Clay Mathematics Institute, the claim has been checked for the first 10 trillion zeros. Those checks are consistent with the hypothesis, but a computer search cannot prove a statement about infinitely many cases. The Clay Institute lists it among its Millennium Prize Problems.
If the hypothesis is true, it would pin down how closely the count of primes follows the smooth estimate in the Prime Number Theorem. Many results in number theory are already proved on the condition that the hypothesis holds.
Twin primes and gaps
Twin primes are pairs that differ by 2, such as 11 and 13 or 17 and 19. The twin prime conjecture says there are infinitely many. It remains unproven, but there has been real progress on a weaker question. In 2013, Yitang Zhang proved that there are infinitely many pairs of consecutive primes separated by less than 70 million. A collaborative Polymath project and James Maynard then lowered the bound sharply, first to 4,680, then to 600, and eventually to 246 (see the prime gap entry). Moving from 246 to 2 is the open problem.
Pattern and randomness
Primes behave in a strange way: they are fully determined, yet they look random. There is no simple formula that outputs exactly the primes in order. The Sieve of Eratosthenes finds all primes up to a limit, and polynomial formulas can generate some primes, but no closed-form expression for the nth prime is known. Yet statistically they follow strict laws. The mathematicians who study this balance include Carl Friedrich Gauss, who later said he had guessed the shape of the Prime Number Theorem as a teenager from tables of primes, and Leonhard Euler, who linked primes to infinite series long before Riemann.
For a sense of how enormous numbers like the record prime sit in the broader landscape of mathematics, what is the biggest number covers the scale from large finite numbers to infinity.
Primes in nature: a hypothesis, not a fact
Periodical cicadas emerge on cycles of 13 or 17 years, both prime numbers. A popular explanation is that prime cycles make it harder for predators with short life cycles to synchronize with the cicadas. A second hypothesis says prime cycles reduce interbreeding between cicada broods that emerge on different schedules, which would protect the long-cycle trait. Both are hypotheses supported by mathematical modeling, not settled facts, and the genetic control of the cycle length is still debated (summarized in the periodical cicada entry). The cicadas are a fun illustration but not proof that primes shape biology.
Common misunderstandings
"The largest prime was found by a supercomputer." In 2024 it was a distributed cloud of commercial GPUs rented across data centers, coordinated by one person, running software from a volunteer project.
"The record has been verified for years." The record was confirmed independently within about a week.
"If it is the biggest, mathematicians must be near the end." There is no end. Euclid's argument works at every scale, and the record will be broken again.
"Primes are only for cryptography." Cryptography is the best-known application. Much of the research is pure mathematics, where the payoff is understanding.
"A computer can prove the Riemann Hypothesis by checking." Checking trillions of zeros builds confidence, but a proof needs an argument covering all of the infinitely many cases.
FAQ
Q: Is there a formula that generates all prime numbers? A: No simple one is known. The Sieve of Eratosthenes finds every prime up to a limit, and some formulas produce primes for a while, but no closed-form formula yields exactly the primes in order.
Q: How do we know the record prime is really prime? A: Because the Lucas-Lehmer test is a definitive test for Mersenne numbers, not a probabilistic one. For the 2024 record, the test was run independently on different programs and hardware, including Prime95 on Intel CPUs, GpuOwl on AMD and NVIDIA GPUs, Mlucas, and CUDALucas, with the last confirmation on October 19, 2024.
Q: What is the smallest prime? A: Two. It is also the only even prime.
Q: Will the record be broken again? A: Almost certainly. Euclid's proof guarantees larger primes exist, and GIMPS continues to test exponents. The timing is unpredictable. The gaps between recent records were about one to six years.
Q: How many Mersenne primes are known? A: Fifty-two, as of the 2024 discovery. It is not even known whether the set of Mersenne primes is finite or infinite.
Q: Can a quantum computer find the largest prime? A: Quantum computers are expected to threaten the factoring problem behind RSA, not to find record primes. The Lucas-Lehmer test already tells us whether a Mersenne number is prime, so the bottleneck for record hunting is classical multiplication speed and reliability.
Q: Do I need a special computer to join the search? A: GIMPS's software is free and runs on ordinary computers, though the 2024 discovery used a large GPU network. Wikipedia's GIMPS entry lists about 290,000 total users and 3.2 million total hosts over the project's life.
The takeaway
The largest known prime is a tidy symbol of something larger. Primes are infinite, so every record is temporary, and the number found in 2024 matters less than the machinery that found it: a test that identifies primality without finding factors, an error check that makes weeks of arithmetic trustworthy, and a community that has been refining all of it since 1996. The record prime itself protects no password. The real payoff is the mathematics around it, from the unproven Riemann Hypothesis to the unfinished work on gaps between primes, where understanding still lags far behind the calculation.
Sources
- GIMPS: M136279841 discovery announcement
- Wikipedia: Largest known prime number
- Wikipedia: Mersenne prime
- EFF Cooperative Computing Awards
- Clay Mathematics Institute: Riemann Hypothesis
- Gidney, How to factor 2048 bit RSA integers with less than a million noisy qubits (arXiv)
- NIST: First 3 finalized post-quantum encryption standards
Related Reading
- What Is the Biggest Number — And Why Infinity Breaks Mathematics
- What Is the Higgs Boson — and Why It Matters
- What Is Entropy — and Why the Universe Keeps Running Down
- What Is Quantum Gravity — The Theory That Could Unite Physics?
- What Is the Speed of Dark — And Other Things That Move Faster Than Light
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles

Why Exponential Growth Is So Hard to Understand — And So Important
The human brain evolved to grasp linear change. Exponential growth — doubling, tripling, compounding — reliably fools us. This one cognitive blind spot shapes pandemics, wealth, technology, and climate change.

Why Diamonds Are So Expensive — And Whether Lab-Grown Ones Change Everything
Diamonds cost thousands of dollars — but is that price justified by geology, or manufactured by marketing? We break down the science, the monopoly, and the lab-grown revolution changing everything.

How Prime Numbers Work: The Math Behind Internet Security
Prime numbers seem like a curious curiosity from school math. They're actually the foundation of every secure transaction on the internet — and one of the deepest mysteries in mathematics.

Infinity in Mathematics: How Some Infinities Are Bigger Than Others
Not all infinities are equal. Georg Cantor proved that some infinite sets are larger than others — a discovery so strange it drove mathematicians mad.

Fermat's Last Theorem: The 358-Year Math Mystery Finally Solved
A margin note scribbled in the 1630s baffled the world's greatest mathematicians for 358 years. Here's how it was finally cracked.

The Fibonacci Sequence and the Golden Ratio in Nature
Sunflowers, nautilus shells, pinecones, and galaxies — the Fibonacci sequence seems to appear everywhere in nature. Some of it is real mathematics; some is pattern-matching wishful thinking. Here's the honest story.