Perfect numbers explained

6 = 1 + 2 + 3, 28 = 1 + 2 + 4 + 7 + 14, and 496 = 1 + 2 + 4 + 8 + 16 + 31 + 62 + 124 + 248. Numbers that are the sum of their own proper divisors fascinated Greek mathematicians, gave Euclid a theorem and Euler its converse, and still hide one of the oldest unsolved problems in mathematics: is there an odd one?

A bar of length 28 above its proper divisors 14, 7, 4, 2 and 1 stacked to exactly the same length, over a grid of the numbers 1 to 120 coloured as deficient, abundant or perfect
A bar of length 28 above its proper divisors 14, 7, 4, 2 and 1 stacked to exactly the same length, over a grid of the numbers 1 to 120 coloured as deficient, abundant or perfect

Three kinds of numbers

Compare a number with the sum of its proper divisors, the divisors smaller than itself, and it falls into one of three classes. If the sum is smaller, as for 8 (1 + 2 + 4 = 7), the number is deficient; if it is larger, as for 12 (1 + 2 + 3 + 4 + 6 = 16), it is abundant; if it is equal, as for 6 and 28, it is perfect. The names go back to Nicomachus of Gerasa, around 100 AD, who saw excess in the abundant numbers, want in the deficient ones, and in the perfect numbers the rare balance between them. Deficient numbers are the majority, about three in four: every prime and every power of a prime is deficient.

Abundant numbers

Every multiple of a perfect or abundant number is abundant, which is why 12, 18, 20, 24 and 30 follow each other so closely. The share of abundant numbers settles at about 24.76 percent: of the numbers up to 100,000, 24,795 are abundant. Nearly all of them are even. The first odd abundant number is 945 = 3³ × 5 × 7, whose proper divisors add up to 975, and the first that is not divisible by 3 is 5,391,411,025. Every number larger than 20,161 is the sum of two abundant numbers.

Euclid, Euler and the Mersenne primes

Around 300 BC Euclid proved in the Elements that if 2^p − 1 is prime, then 2^(p−1)(2^p − 1) is perfect: p = 2 gives 6, p = 3 gives 28, p = 5 gives 496 and p = 7 gives 8,128. Some two thousand years later Leonhard Euler proved the converse for even numbers: every even perfect number has this form. So the even perfect numbers and the primes of the form 2^p − 1, named after the 17th-century friar Marin Mersenne, come in pairs. 2^p − 1 can only be prime when p is prime, but not every prime p works: 2^11 − 1 = 2,047 = 23 × 89.

Euclid, in a 17th-century painting by Jusepe de Ribera. Around 300 BC, in the Elements, he proved that if 2^p − 1 is prime then 2^(p−1)(2^p − 1) is perfect.
Euclid, in a 17th-century painting by Jusepe de Ribera. Around 300 BC, in the Elements, he proved that if 2^p − 1 is prime then 2^(p−1)(2^p − 1) is perfect.
Portrait of Leonhard Euler
Portrait of Leonhard Euler

52 known so far

Mersenne primes are rare and enormous. Every one found since 1996 was found by the Great Internet Mersenne Prime Search (GIMPS), in which volunteers' computers test one exponent after another. As of late 2024, 52 were known. The largest, 2^136,279,841 − 1, was found in October 2024 and has 41,024,320 digits, so its perfect number has 82,048,640. Not every exponent between the largest ones has been checked yet, so there could still be undiscovered Mersenne primes, and perfect numbers, in between. Every even perfect number ends in 6 or 28.

Is there an odd perfect number?

Nobody has found one, and nobody has proved that none exists. René Descartes looked for one in 1638 and found a near miss: 198,585,576,189 = 3² × 7² × 11² × 13² × 22,021 would be perfect if 22,021 were prime, but it is 19² × 61. Since then the conditions have piled up. Pascal Ochem and Michaël Rao showed in 2012 that an odd perfect number would have to be larger than 10^1500, and it would need at least 10 different prime factors. In 1888 James Joseph Sylvester wrote that its existence would be little short of a miracle.

Amicable pairs and aliquot sequences

Two numbers are amicable when each is the sum of the other's proper divisors, like 220 and 284. Repeat the step from any number and you get its aliquot sequence: 12, 16, 15, 9, 4, 3, 1. Most sequences end at 1 after passing a prime, some reach a perfect number or an amicable pair, and a few enter longer cycles of sociable numbers, such as the five-number cycle of 12,496 and the 28-number cycle of 14,316. Eugène Catalan and Leonard Dickson conjectured that every sequence ends in one of these ways, but five starting numbers below 1,000, 276, 552, 564, 660 and 966, have been followed a long way without reaching an end, and Richard Guy and John Selfridge suspected that many sequences grow forever.

Explore it

Open the finder and type any number up to 10^19. Divisors writes out the sum of the proper divisors and σ(n) from the prime factors, and stacks the divisors against a bar as long as the number. Sequence follows the aliquot sequence for up to 1,000 steps. Range colours every number up to 100,000 by class and lists the perfect numbers, amicable pairs and odd abundant numbers in it, and Known shows the perfect numbers of the 52 known Mersenne primes.

Frequently asked questions

Why is 1 not perfect?

1 has no proper divisors, so their sum is 0 and 1 counts as deficient. In terms of σ, the sum of all divisors, a perfect number has σ(n) = 2n, and σ(1) = 1.

Are perfect numbers triangular?

The even ones are: 2^(p−1)(2^p − 1) = 1 + 2 + 3 + … + (2^p − 1), the sum of all the numbers up to a Mersenne prime. 28 = 1 + 2 + … + 7 and 496 = 1 + 2 + … + 31.

What is the abundancy of a number?

σ(n)/n, the sum of all its divisors divided by n, which is also the sum of the reciprocals of its divisors. It is less than 2 for deficient numbers, exactly 2 for perfect ones and more than 2 for abundant ones; 945 has 1,920/945 ≈ 2.03. Numbers whose abundancy is a whole number k are called k-perfect: σ(120) = 360, three times 120.

What are sociable numbers?

Numbers whose aliquot sequence comes back to them after more than two steps. Paul Poulet found the first two cycles in 1918: 12,496 → 14,288 → 15,472 → 14,536 → 14,264 → 12,496, and a cycle of 28 numbers through 14,316, which is still the longest known.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

Find perfect numbers