The Number That Equals Its Parts

  • Medium
  • Number puzzles
  • Tests: Adding up proper divisors

The puzzle

6 has proper divisors 1, 2 and 3, and 1 + 2 + 3 = 6. A number with that property is called perfect.

Find the next perfect number after 6, and the one after that. How would you generate more?

Stuck?

One at a time, smallest first. Open only as many as you need — the whole point of the puzzle is the part you work out yourself.

Hint 1

Try the small numbers in turn. Most come out short - 8 gives 1 + 2 + 4 = 7.

Hint 2

6 = 2 x 3 and the next one is 4 x 7. Look at the second factor.

Show the answer Hide the answer

28 = 1 + 2 + 4 + 7 + 14, then 496. They come from Euclid's rule: if 2^p - 1 is prime, then 2^(p-1) x (2^p - 1) is perfect.

How to get there

28 has proper divisors 1, 2, 4, 7 and 14, and those add to 28. Checking the numbers below it: 8 gives 7, 12 gives 16, 18 gives 21, 20 gives 22 - none perfect.

The pattern: 6 = 2 x 3, 28 = 4 x 7, 496 = 16 x 31. In each case the second factor is one less than twice the first, and is prime: 3, 7, 31 are 2^2-1, 2^3-1 and 2^5-1. Euclid proved that whenever 2^p - 1 is prime, 2^(p-1) x (2^p - 1) is perfect.

Those primes are the Mersenne primes, and they are scarce: the next gives 8128, and then the fifth perfect number jumps to 33,550,336. Only 51 are known, every one even - whether an odd perfect number exists is still unsettled after two thousand years.

The technique worth keeping

Test a definition on the small cases before looking for structure, then factorise the hits. Writing 6, 28 and 496 as 2 x 3, 4 x 7 and 16 x 31 makes Euclid's rule almost impossible to miss.