# Perfect number

A perfect number is one for which the sum of its factors (excluding the number itself) is equal to the given number.

Examples:

The first perfect number is 6:

• the factors of 6 are 1, 2, 3 and 6.
• the sum of 1 + 2 + 3 = 6

The second perfect number is 28:

• the factors of 28 are 1, 2, 4, 7, 14 and 28
• the sum of 1 + 2 + 4 + 7 + 14 = 28

The next perfect number is 496:

• the factors are : 1, 2, 4, 8, 16, 31, 62, 124, 248, 496
• the sum of 1 + 2 + 4 + 8 + 16 + 31 + 62 + 124 + 248 = 496

It is relatively straightforward to show that any number P of the form P = 2n-1 (2n-1), for which (2n-1) is prime, is a perfect number. Prime numbers of the form (2n-1), for which n is also prime, are called Mersenne Primes, after Marin Mersenne (1588-1648).

Note that (2n-1) is not a prime for all prime n, for example (211-1) = 2047, which is divisible by 13. The first 12 Mersenne primes are (2n-1) with: n = 2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107 and 127.

Many of Euclid's successors assumed that all perfect numbers were of this form, Euler in 1849 provided the first proof that Euclid's formula gives all possible even perfect numbers.

It is not known if any odd perfect numbers exist, although numbers up to 10300 have been checked without success.