In number theory, a perfect number is a positive integer that is equal to the sum of its positive proper divisors, that is, divisors excluding the number itself. For instance, 6 has proper divisors 1, 2 and 3, and 1 + 2 + 3 = 6, so 6 is a perfect number. The next perfect number is 28, since 1 + 2 + 4 + 7 + 14 = 28.
The first four perfect numbers are 6, 28, 496 and 8128.[1]
The sum of proper divisors of a number is called its aliquot sum, so a perfect number is one that is equal to its aliquot sum. Equivalently, a perfect number is a number that is half the sum of all of its positive divisors; in symbols, where is the sum-of-divisors function.
This definition is ancient, appearing as early as Euclid's Elements (VII.22) where it is called τέλειος ἀριθμός (perfect, ideal, or complete number). Euclid also proved a formation rule (IX.36) whereby is an even perfect number whenever is a prime of the form for positive integer —what is now called a Mersenne prime. Two millennia later, Leonhard Euler proved that all even perfect numbers are of this form.[2] This is known as the Euclid–Euler theorem.
It is not known whether there are any odd perfect numbers, nor whether infinitely many perfect numbers exist.