Perfect Numbers: Numbers That Equal the Sum of Their Parts
Add up the divisors of 6, not counting 6 itself: 1 + 2 + 3 = 6. Do the same for 28: 1 + 2 + 4 + 7 + 14 = 28. Numbers like these, equal to the sum of their proper divisors, are called perfect numbers.
They're astonishingly rare. Below 10,000 there are only four: 6, 28, 496 and 8128. After more than 2,000 years of searching, only 52 are known. And one of the oldest unsolved problems in mathematics asks something that sounds simple: is there an odd one?
Every Known Perfect Number Comes From a Prime
Perfect numbers look like they're about adding divisors. But they're really about primes. Every even perfect number is built from one special kind of prime, a Mersenne prime, and each Mersenne prime produces exactly one perfect number.
That's why the list of known perfect numbers grows only when someone discovers a new record-breaking prime.
Perfect, Abundant and Deficient
The ancient Greeks sorted numbers by comparing each number with the sum of its proper divisors (all divisors except the number itself):
| Type | Rule | Example |
|---|---|---|
| Deficient | Sum < number | 8: 1 + 2 + 4 = 7 |
| Perfect | Sum = number | 6: 1 + 2 + 3 = 6 |
| Abundant | Sum > number | 12: 1 + 2 + 3 + 4 + 6 = 16 |
Most numbers are deficient. All primes are deficient, since their only proper divisor is 1. 12 is the smallest abundant number. Perfect numbers sit on the knife's edge between the two. Nicomachus of Gerasa described this classification around 100 AD, calling abundant numbers excessive and deficient numbers lacking. Find divisors of any number with the prime factorization tool.
The First Four Perfect Numbers
6 = 1 + 2 + 3
28 = 1 + 2 + 4 + 7 + 14
496 = 1 + 2 + 4 + 8 + 16 + 31 + 62 + 124 + 248
8128 = 1 + 2 + 4 + 8 + 16 + 32 + 64 + 127 + 254 + 508 + 1016 + 2032 + 4064
Look at the pattern in the factorizations:
6 = 2¹ × 3 (3 = 2² − 1)
28 = 2² × 7 (7 = 2³ − 1)
496 = 2⁴ × 31 (31 = 2⁵ − 1)
8128 = 2⁶ × 127 (127 = 2⁷ − 1)
Each is a power of 2 times a prime that's one less than the next power of 2. Explore the pages for 6, 28, 496 and 8128.
Euclid's Formula
Around 300 BC, Euclid proved in Book IX of the Elements:
If 2ᵖ − 1 is prime, then 2ᵖ⁻¹ × (2ᵖ − 1) is perfect.
Here's why. Let q = 2ᵖ − 1 be prime. The divisors of N = 2ᵖ⁻¹ × q are the powers of 2 up to 2ᵖ⁻¹, and each of those times q. Adding all divisors, including N itself:
(1 + 2 + 4 + … + 2ᵖ⁻¹) × (1 + q) = (2ᵖ − 1) × 2ᵖ = 2N
The sum of all divisors is 2N, so the proper divisors add to exactly N. The first factor is a geometric series, which sums neatly to 2ᵖ − 1.
Primes of the form 2ᵖ − 1 are called Mersenne primes, after the 17th-century French friar Marin Mersenne.
An Insider Reference: Euler Completes the Picture
Euclid showed that his formula always produces perfect numbers. But are there any even perfect numbers it misses?
About 2,000 years later, Leonhard Euler proved there aren't. Every even perfect number has Euclid's form. The proof was published after Euler's death, in 1849. This is now called the Euclid–Euler theorem, and it links perfect numbers and Mersenne primes one-to-one.
The largest known perfect number comes from the largest known prime, 2¹³⁶²⁷⁹⁸⁴¹ − 1, found in October 2024:
2¹³⁶²⁷⁹⁸⁴⁰ × (2¹³⁶²⁷⁹⁸⁴¹ − 1)
It has more than 82 million digits.
The Odd Perfect Number Problem
Nobody has ever found an odd perfect number. Nobody has proved one can't exist either. It's been open since antiquity.
What we do know is that any odd perfect number would have to be extraordinarily constrained:
- In 2012, Pascal Ochem and Michaël Rao proved it would have to be larger than 10¹⁵⁰⁰
- It would need at least 10 distinct prime factors
- It would have a very specific form involving a prime raised to an odd power
The constraints keep tightening, but a proof of impossibility remains out of reach. The French mathematician René Descartes reportedly came close to one with his "spoof" near-miss: 198,585,576,189 behaves like an odd perfect number if you pretend one of its non-prime factors is prime.
Curious Properties
- Every even perfect number is a triangular number: 6 = 1 + 2 + 3, 28 = 1 + 2 + … + 7, 496 = 1 + 2 + … + 31.
- Every even perfect number ends in 6 or 28.
- The sum of the reciprocals of all divisors of a perfect number is exactly 2: 1/1 + 1/2 + 1/4 + 1/7 + 1/14 + 1/28 = 2.
- The fifth perfect number, 33,550,336, appears in a manuscript from the 1400s, about 1,700 years after the first four were known.
Two Concepts Worth Knowing
Divisor Function
The divisor function σ(n) adds up all divisors of n, including n. A number is perfect exactly when σ(n) = 2n. For multiplicative reasons, σ is easy to compute from a prime factorization.
Mersenne Prime
A Mersenne prime is a prime of the form 2ᵖ − 1. The exponent p must itself be prime, but that isn't enough: 2¹¹ − 1 = 2047 = 23 × 89. Check it with the prime checker.
Quick Answer: What Is a Perfect Number?
A perfect number equals the sum of its proper divisors. The first four are 6, 28, 496 and 8128. Every even perfect number has the form 2ᵖ⁻¹(2ᵖ − 1), where 2ᵖ − 1 is a Mersenne prime. Only 52 are known, and whether any odd perfect number exists is still unsolved.
Try Them Yourself
- Number 28: the second perfect number
- Number 8128: the fourth perfect number
- Prime Factorization: find the divisors of any number
- Is 2,047 Prime?: why not every 2ᵖ − 1 works
- Number Theory Formulas: the divisor function
- Why There Are Infinitely Many Primes: the primes behind perfect numbers
Check whether 12, 18, 20 and 30 are deficient, perfect or abundant. Then try to find the smallest odd abundant number. (Hint: it's 945.)