Perfect Numbers and Mersenne Primes: A 2,000-Year Hunt
Take the number 6. Its divisors — the numbers that divide evenly into it, not counting itself — are 1, 2, and 3. Add them up: 1 + 2 + 3 = 6. The number rebuilds itself out of its own pieces. Now try 28: its divisors are 1, 2, 4, 7, and 14. Sum them and you get 28 again. These numbers are rare, strange, and for over two thousand years they've been at the center of one of the longest-running hunts in mathematics — a hunt that is, right now, still open, still running on volunteers' computers around the world, and still hasn't answered its oldest question.
The Concept
A perfect number is a positive integer that equals the sum of its own proper divisors — every divisor except the number itself. Six is the smallest: 1 + 2 + 3 = 6. The next is 28 (1 + 2 + 4 + 7 + 14 = 28), then 496, then 8,128. After that, the gaps get enormous — the fifth perfect number, 33,550,336, wasn't confirmed until the 15th century, and each new one has taken longer to find than the last.
The reason perfect numbers connect to another famous class of numbers — Mersenne primes — comes from a theorem Euclid proved around 300 BCE in Book IX of his Elements. Euclid showed that whenever the number 2^p − 1 is prime, the number 2^(p−1) × (2^p − 1) is perfect. Numbers of the form 2^p − 1 are called Mersenne numbers, named after the 17th-century French friar Marin Mersenne, and when one of them happens to be prime, it's a Mersenne prime.
Watch it work: if p = 2, then 2^p − 1 = 3, which is prime, so 2^1 × 3 = 6 — the first perfect number. If p = 3, then 2^p − 1 = 7, prime again, so 2^2 × 7 = 28. If p = 5, then 2^p − 1 = 31, prime, giving 2^4 × 31 = 496. Every even perfect number known falls out of this same machine: find a prime exponent p such that 2^p − 1 is also prime, and you've generated a perfect number for free.
For two thousand years, mathematicians only had half the picture — Euclid showed this construction produces perfect numbers, but not that it produces all of them. That gap wasn't closed until Leonhard Euler, in the 18th century, proved the converse: every even perfect number must be of this exact form. The combined result is now called the Euclid-Euler theorem, and it means the entire search for even perfect numbers collapses into a single, narrower search — the hunt for Mersenne primes.
Why It Matters
Here's the catch that makes this more than tidy number theory: nobody knows whether an odd perfect number exists. Not one has ever been found, and no one has proven it's impossible. The Greek mathematician Nicomachus asserted around 100 CE, without proof, that all perfect numbers must be even — and mathematicians have been trying to either confirm or break that assumption ever since. It's frequently cited as the oldest unsolved problem in mathematics.
The search hasn't been for lack of trying. In 2012, mathematicians Pascal Ochem and Michael Rao proved that if an odd perfect number exists, it must be larger than 10^1500 — a number with over 1,500 digits — and must have at least 101 prime factors (counted with repetition). Every year the net of "if it exists, it must satisfy these increasingly absurd constraints" tightens, and every year no one has found one or ruled them out entirely. It's a problem simple enough to explain to a middle schooler and stubborn enough to have outlasted every mathematician who's ever attempted it.
Meanwhile, the even side of the problem — thanks to Euclid and Euler — turned into something almost as remarkable: a permanent, ongoing competitive sport. Because every even perfect number corresponds to a Mersenne prime, finding bigger perfect numbers means finding bigger Mersenne primes, and that search has become one of the longest-running distributed computing projects in history.
The Great Internet Mersenne Prime Search (GIMPS), launched in 1996, lets anyone donate spare computer processing time to test candidate Mersenne numbers for primality. It has found essentially every record-setting prime discovered since. The current record holder, discovered on October 12, 2024, is 2^136,279,841 − 1 — a number with just over 41 million digits. It was found by Luke Durant, a former Nvidia engineer, using a "cloud supercomputer" of thousands of GPUs spread across 24 data-center regions in 17 countries. Written out at a normal font size, that single number would stretch for miles.
The Details
Why the exponent has to be prime. There's a nice bit of internal logic here: if p itself is not prime, 2^p − 1 can't be prime either, because 2^(ab) − 1 is always divisible by 2^a − 1 for any factorization p = a × b. So GIMPS doesn't waste time testing composite exponents at all — only prime values of p are candidates, and even then, most of them fail. Not every prime p gives a prime 2^p − 1: p = 11 gives 2^11 − 1 = 2,047 = 23 × 89, which is composite. Primality here is genuinely rare — of the tens of millions of prime exponents checked so far, only 52 are known to produce a Mersenne prime.
How GIMPS tests candidates. The core tool is the Lucas-Lehmer test, a primality test specifically built for numbers of the form 2^p − 1. It works by iterating a simple recurrence — each term is the previous term squared, minus 2, starting from 4 — exactly p − 2 times, then checking whether the result is divisible by 2^p − 1. It's remarkably efficient for numbers of this exact shape, which is precisely why Mersenne primes, rather than random large primes, dominate the record books: they're the only enormous numbers we have a fast enough test for.
The moon, the calendar, and mysticism. Perfect numbers picked up numerological baggage almost immediately. The 4th-century theologian Augustine of Hippo wrote that God created the world in six days not because six was a convenient number, but because six is perfect — the world's perfection reflects the number's. Medieval scholars pointed out that 28, the second perfect number, matches the days in a lunar month, and treated the coincidence as evidence of a designed cosmos. Ancient Greeks tied the number 6 to concepts of marriage, health, and balance. None of it holds up as mathematics, but it's a reminder that perfect numbers fascinated people who had no algebraic language to describe why they were special — only the observation that the pattern felt too clean to be accidental.
How rare "new" ones are. The pace of discovery says a lot about how the difficulty compounds. The first four perfect numbers (6, 28, 496, 8,128) were all known to the ancient Greeks. The fifth, 33,550,336, wasn't verified until around 1456, in an anonymous medieval manuscript. Pietro Cataldi correctly found the sixth and seventh in 1588, but then incorrectly guessed at several more exponents that turned out not to be prime — an error that stood uncorrected in places for over a century. Euler himself waded into the search, confirming in 1772 that 2^31 − 1 is prime, producing the eighth perfect number. It then took until the computer era for the pace to pick up again: the ninth wasn't confirmed until 1883, and it's been an escalating arms race of hardware ever since — mechanical calculators in the early 20th century, room-sized computers by the 1950s, and now globally distributed GPU clusters.
Why this particular shape of number keeps winning. It's worth pausing on why Mersenne primes specifically dominate the record books instead of some other prime family. It isn't that primes of the form 2^p − 1 are unusually dense — they're not. It's that the Lucas-Lehmer test gives an extremely fast, deterministic way to check primality for exactly this form, while general-purpose primality tests are far slower for numbers of comparable size. The search for the largest known prime, in other words, is really a search constrained by which numbers we know how to check quickly — a reminder that a lot of what looks like "the biggest known X" is actually "the biggest X we currently have the tools to verify."
Takeaways
- A perfect number equals the sum of its own divisors (excluding itself) — 6, 28, 496, and 8,128 are the first four, known since antiquity.
- Euclid proved that 2^(p−1) × (2^p − 1) is perfect whenever 2^p − 1 is prime; Euler proved, roughly two thousand years later, that this formula captures every even perfect number.
- No odd perfect number has ever been found, and none has been proven impossible — it's one of the oldest open problems in mathematics, with any candidate now known to require more than 1,500 digits and at least 101 prime factors.
- The hunt for even perfect numbers is really the hunt for Mersenne primes, now carried out by GIMPS, a volunteer distributed-computing project running continuously since 1996.
- The current record, 2^136,279,841 − 1, has over 41 million digits and was found in 2024 using a globally distributed GPU network — proof that a 2,300-year-old question is still actively being answered with 21st-century hardware.
Resources: GIMPS / mersenne.org, Euclid-Euler theorem — Wikipedia, Ochem & Rao, "Odd perfect numbers are greater than 10^1500"