Perfect Number Checker
Enter any positive integer to find its proper divisors, aliquot sum, and classification as perfect, abundant, or deficient.
First Five Known Perfect Numbers
| # | Perfect Number | Mersenne Prime (p) | Formula: 2^(p−1) × (2^p−1) |
|---|---|---|---|
| 1 | 6 | p = 2 | 2¹ × 3 |
| 2 | 28 | p = 3 | 2² × 7 |
| 3 | 496 | p = 5 | 2ⴠ× 31 |
| 4 | 8,128 | p = 7 | 2ⶠ× 127 |
| 5 | 33,550,336 | p = 13 | 2¹² × 8191 |
What Is a Perfect Number?
A perfect number is a positive integer that equals the sum of all its proper divisors — every positive divisor except the number itself. The ancient Greeks called such numbers "perfect" or "complete" because they are neither wanting nor excessive. The smallest perfect number is 6, whose proper divisors are 1, 2, and 3, and 1 + 2 + 3 = 6.
The concept dates back at least to Nicomachus of Gerasa (~100 AD), who classified numbers into perfect, abundant (aliquot sum exceeds the number), and deficient (aliquot sum is less). Every even perfect number is closely linked to a Mersenne prime — a prime of the form 2^p − 1 — via a theorem first proven by Euler.
Perfect vs Abundant vs Deficient Numbers
Perfect
Aliquot sum = n
6, 28, 496, 8128…
Abundancy index = 1
Abundant
Aliquot sum > n
12, 18, 20, 24…
Abundancy index > 1
Deficient
Aliquot sum < n
1, 2, 3, 4, 9, 15…
Abundancy index < 1
All prime numbers are deficient because the only proper divisor of a prime p is 1, and 1 < p. Powers of 2 are also always deficient: the proper divisors of 2^k are 1, 2, 4, …, 2^(k−1), summing to 2^k − 1 which is just one less than 2^k.
Abundant numbers are more common than perfect numbers — there are infinitely many of them. The smallest abundant number is 12, and about 25% of all positive integers are abundant. The first odd abundant number is 945 = 3^3 × 5 × 7.
History of Perfect Numbers
Perfect numbers have fascinated mathematicians for over 2,000 years. Euclid (~300 BCE) showed in Elements Book IX that if 2^p − 1 is prime, then 2^(p−1) × (2^p − 1) is perfect. This gives a recipe for constructing even perfect numbers from Mersenne primes. Over two millennia later, Leonhard Euler proved the converse: every even perfect number must have this form. Together, the Euclid-Euler theorem completely characterises even perfect numbers.
Medieval scholars connected perfect numbers to theological symbolism. Saint Augustine wrote in City of God (426 AD) that God created the world in 6 days because 6 is perfect. Mersenne himself compiled a famous list of candidate primes 2^p − 1 in 1644, driving centuries of computation to verify which candidates are truly prime.
Euler's Theorem on Even Perfect Numbers
Euler's theorem states: every even perfect number has the form 2^(p−1) × (2^p − 1), where 2^p − 1 is a Mersenne prime and p itself must be prime. This means finding new even perfect numbers is exactly equivalent to finding new Mersenne primes — a search that the Great Internet Mersenne Prime Search (GIMPS) has automated using distributed computing since 1996.
The abundancy index of a number n is σ(n)/n, where σ(n) is the sum of all divisors including n. For a perfect number, σ(n)/n = 2. For an abundant number, σ(n)/n > 2; for a deficient number, σ(n)/n < 2.
Open Problem: Are There Odd Perfect Numbers?
This is one of the oldest unsolved problems in mathematics. Despite centuries of effort, no odd perfect number has ever been found. Extensive computer searches have shown that if one exists, it must be greater than 10^1500 and satisfy dozens of strict conditions: it must have at least 101 prime factors (counting multiplicity), at least 10 distinct prime factors, and must not be divisible by 2 or any of the first several primes in specific ways. Most mathematicians strongly suspect no odd perfect numbers exist, but no proof has been found.