Blog Mascot

Wednesday, August 26, 2009

Perfect numbers

A perfect number is one for which the sum of its factors (including 1, but not including itself) equals itself. The smallest perfect number is 6, since its factors are 1, 2, and 3, and 1 + 2 + 3 = 6. The next is 28, whose factors are 1, 2, 4, 7, and 14.

6 and 28 are the start of a pattern; both are the product of a power of 2 and and less than the next power of two. In other words, they are 2n * (2n+1 - 1) for n equal to 1 and 2 respectively. However, the next number in the sequence, 8 * 15, or 120, is not perfect. Its factors, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, and 60, add up to far more than 120 (in fact, twice as much.). Why the difference?

Well, suppose (2n+1 - 1) is prime. We can now enumerate the factors of 2n * (2n+1 - 1) : They will be
1, 2, ..., 2n, (2n+1 - 1), 2*(2n+1 - 1), ... 2n-1 * (2n+1 - 1)
Since
1 + 2 + ...+ 2n = 2n+1 - 1
and
(2n+1 - 1) + 2*(2n+1 - 1) + ... 2n-1 * (2n+1 - 1) =
(2n - 1)(2n+1 - 1) =
22n+1 - 2n+1 - 2n + 1

if you add them together, you get
2n+1 - 1 + 22n+1 - 2n+1 - 2n + 1  =
22n+1 - 2n =
2n * (2n+1 - 1) 
or the original number.  But when (2n+1 - 1) isn't prime, there will be additional factors (as with 120, which, because 15 isn't prime, has the "extra" factors 3, 5, 6, 10, etc.), so the result isn't perfect.  Primes of the form (2n+1 - 1) are called Mersenne primes.  Only 47 of them are known, the largest being 243,112,609 − 1.  There are also 47 known perfect numbers, one corresponding to each Mersenne prime.  It can be proved that all even perfect number is of this form; it's an open question whether there are any odd perfect numbers.

No comments:

Post a Comment