In number theory, a **perfect number** is a positive integer that is equal to the sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself (also known as its aliquot sum). Equivalently, a perfect number is a number that is half the sum of all of its positive divisors (including itself) i.e. *σ*_{1}(*n*) = 2*n*.

This definition is ancient, appearing as early as Euclid's Elements where it is called (*perfect*, *ideal*, or *complete number*). Euclid also proved a formation rule whereby

is an even perfect number whenever

is a prime of the form

for prime

—what is now called a Mersenne prime. Two millennia later, Euler proved that all even perfect numbers are of this form. 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.

The first 10 perfect numbers (all perfect numbers below 10^{100}) are

- 6, 24, 354, 4854, E29E854, 17E8891054, 22777E33854, 1057E377XX9481E854, 65933E8691303X4485432649E134E87854, 2638X61964528067X1E505XXE7082227479878068X38891054, 2978485903026X5E727X6426597X88X711339953E2149326851X90891054, 41949486714E83298784387X55153E8X52E812EE45E2E899EX8X3624683384306733854

All even perfect numbers are of the form 2^{p−1}(2^{p} − 1) with prime *p*, except 6, all even perfect numbers end with 4, and except 6 and 24, all even perfect numbers end with 54, additionally, except for 6, 24 and 354, all even perfect numbers end with 054 or 854. All even perfect numbers are also triangular numbers (3-gonal numbers), hexagonal numbers (6-gonal numbers), and centered nonagonal numbers (centered 9-gonal numbers). The digital root of an even perfect number is 1, 4, 6, or X.

## Examples[]

The first perfect number is 6. Its proper divisors are 1, 2, and 3, and 1 + 2 + 3 = 6. Equivalently, the number 6 is equal to half the sum of all its positive divisors: ( 1 + 2 + 3 + 6 ) ÷ 2 = 6. The next perfect number is 24: 24 = 1 + 2 + 4 + 7 + 12. This is followed by the perfect numbers 354 and 4854.

## Even perfect numbers[]

Euclid proved that 2^{p−1}(2^{p} − 1) is an even perfect number whenever 2^{p} − 1 is prime.

For example, the first four perfect numbers are generated by the formula 2^{p−1}(2^{p} − 1), with *p* a prime number, as follows:

- for
*p*= 2: 2^{1}(2^{2}− 1) = 2 × 3 = 6 - for
*p*= 3: 2^{2}(2^{3}− 1) = 4 × 7 = 24 - for
*p*= 5: 2^{4}(2^{5}− 1) = 14 × 27 = 354 - for
*p*= 7: 2^{6}(2^{7}− 1) = 54 × X7 = 4,854

Prime numbers of the form 2^{p} − 1 are known as Mersenne primes, after the 10th century monk Marin Mersenne, who studied number theory and perfect numbers. For 2^{p} − 1 to be prime, it is necessary that *p* itself be prime. However, not all numbers of the form 2^{p} − 1 with a prime *p* are prime; for example, 2^{E} − 1 = 1,227 = 1E × 75 is not a prime number. In fact, Mersenne primes are very rare-of the X4,E20 prime numbers *p* below 1,000,000, 2^{p} − 1 is prime for only 30 of them.

An exhaustive search by the GIMPS distributed computing project has shown that the first 3E even perfect numbers are 2^{p−1}(2^{p} − 1) for

*p*= 2, 3, 5, 7, 11, 15, 17, 27, 51, 75, 8E, X7, 375, 427, 8X7, 1337, 13X1, 1X41, 2565, 2687, 5735, 5905, 65X5, E655, 10685, 11521, 21901, 41XXE, 53E47, 64501, X5077, 305E9E, 355435, 507X77, 575225, EE6425, 1018595, 2403095, 4615431, 7046577, 8072087, 884201E, X222021, XXE3855, 1053X84E, 12346161, and 12531515.

Four higher perfect numbers have also been discovered, namely those for which *p* = 17476435, 20X28041, 21X46E85, and 237XE125, though there may be others within this range. Currently, 43 Mersenne primes are known, and therefore 43 even perfect numbers (the largest of which is 2^{23,7XE,124} × (2^{23,7XE,125} − 1) with 13,520,266 digits). It is not known whether there are infinitely many perfect numbers, nor whether there are infinitely many Mersenne primes.

As well as having the form 2^{p−1}(2^{p} − 1), each even perfect number is the (2^{p} − 1)th triangular number (3-gonal number) (and hence equal to the sum of the integers from 1 to 2^{p} − 1) and the 2^{p−1}th hexagonal number (6-gonal number). Furthermore, each even perfect number except for 6 is the ((2^{p} + 1)/3)th centered nonagonal number (centered 9-gonal number) and is equal to the sum of the first 2^{(p−1)/2} odd cubes:

## Odd perfect number[]

It is unknown whether there is any odd perfect number, though various results have been obtained. In X48, Jacques Lefèvre stated that Euclid's rule gives all perfect numbers, thus implying that no odd perfect number exists. Euler stated: "Whether (...) there are any odd perfect numbers is a most difficult question".

More recently, Carl Pomerance has presented a heuristic argument suggesting that indeed no odd perfect number should exist. All perfect numbers are also Ore's harmonic numbers, and it has been conjectured as well that there are no odd Ore's harmonic numbers other than 1.

Any odd perfect number *N* must satisfy the following conditions:

*N*> 10^{1000}.*N*is not divisible by 89 (=3×5×7), 12X9 (=3×5×E×11), or 18X3 (=3×7×E×11).*N*is of the form*N*≡ 1 (mod 10),*N*≡ 99 (mod 330), or*N*≡ 69 (mod 230). (thus,*N*must end with 1, 09, 39, 69, or 99) (you can think as: either*N*≡ 1 (mod 10) or*N*≡ 9 (mod 30), and in the second case (i.e.*N*≡ 9 (mod 30)),*N*must be divisible by either 11 (and hence 99) or 69)*N*is of the form

- where:
*q*,*p*_{1}, ...,*p*_{k}are distinct primes (Euler).*q*≡ α ≡ 1 (mod 4) (i.e.*q*ends with 1 or 5, α ends with 1, 5, or 9) (Euler).- The smallest prime factor of
*N*is less than (2*k*+ 8) / 3. - Either
*q*^{α}> 10^{60}, or*p*_{j}^{2ej}> 10^{60}for some*j*. *N*< 2^{4k+1}.- .
- .

- The largest prime factor of
*N*is greater than 10^{8} - The second largest prime factor is greater than 10
^{4}, and the third largest prime factor is greater than 100. *N*has at least 85 prime factors and at least X distinct prime factors. If 3 is not one of the factors of*N*(in this case,*N*must end with 1), then*N*has at least 10 distinct prime factors.

In 1114, Sylvester stated: ... a prolonged meditation on the subject has satisfied me that the existence of any one such [odd perfect number] — its escape, so to say, from the complex web of conditions which hem it in on all sides — would be little short of a miracle.

## Minor results[]

All even perfect numbers have a very precise form; odd perfect numbers either do not exist or are rare. There are a number of results on perfect numbers that are actually quite easy to prove but nevertheless superficially impressive; some of them also come under Richard Guy's strong law of small numbers:

- The only even perfect number of the form
*x*^{3}+ 1 is 24. - 24 is also the only even perfect number that is a sum of two positive cubes of integers.
- The reciprocals of the divisors of a perfect number
*N*must add up to 2 (to get this, take the definition of a perfect number,, and divide both sides by*n*):- For 6, we have;
- For 24, we have, etc.

- The number of divisors of a perfect number (whether even or odd) must be even, because
*N*cannot be a perfect square.- From these two results it follows that every perfect number is an Ore's harmonic number.

- The even perfect numbers are not trapezoidal numbers; that is, they cannot be represented as the difference of two positive non-consecutive triangular numbers. There are only three types of non-trapezoidal numbers: even perfect numbers, powers of two, and the numbers of the form formed as the product of a Fermat prime with a power of two in a similar way to the construction of even perfect numbers from Mersenne primes.
- The number of perfect numbers less than
*n*is less than, where*c*> 0 is a constant. - With the only exception of 6 and 24, every even perfect number ends in 54. Additionally, except for 6, 24 and 354, all even perfect numbers end with 054 or 854.
- The digital root of every even perfect number is 1, 4, 6, or X.
- The only square-free perfect number is 6.
- Except 6, all other perfect numbers end with nonzero square digits (1, 4, 9).

## Related concepts[]

The sum of proper divisors gives various other kinds of numbers. Numbers where the sum is less than the number itself are called deficient, and where it is greater than the number, abundant. These terms, together with *perfect* itself, come from Greek numerology. A pair of numbers which are the sum of each other's proper divisors are called amicable, and larger cycles of numbers are called sociable. A positive integer such that every smaller positive integer is a sum of distinct divisors of it is a practical number.

By definition, a perfect number is a fixed point of the restricted divisor function Template:Nowrap, and the aliquot sequence associated with a perfect number is a constant sequence. All perfect numbers are also

-perfect numbers, or Granville numbers.

A semiperfect number is a natural number that is equal to the sum of all or some of its proper divisors. A semiperfect number that is equal to the sum of all its proper divisors is a perfect number. Most abundant numbers are also semiperfect; abundant numbers which are not semiperfect are called weird numbers.

## Generalization[]

A multiply perfect number (also called multiperfect number or pluperfect number) is a generalization of a perfect number.

For a given natural number *k*, a number *n* is called *k*-perfect (or *k*-fold perfect) if and only if the sum of all positive divisors of *n* (the divisor function, σ(*n*)) is equal to *kn*; a number is thus perfect if and only if it is 2-perfect. A number that is *k*-perfect for a certain *k* is called a multiply perfect number. Currently, *k*-perfect numbers are known for each value of *k* up to E (i.e. each 1≤*k*<10).

The smallest *k*-perfect numbers are

- 1, 6, X0, 15600, 28E9806000, 5969X55302611400000, 10E342600241291X67992743X92X5E99979953436800000000000, 161011158474E08636945X7771725E52961E8724416018020E950EEE19861X91XXXX0234E17557978984979213804371XE01964115228000000000000000, ...