Perfect Numbers & Mersenne Primes
The condition (n) = 2n and the Euclid–Euler theorem.
The idea
A perfect number is a positive integer that equals the sum of its proper divisors: $6 = 1 + 2 + 3$ is the smallest. Write $\sigma(n)$ for the sum of all divisors of $n$, $n$ included; the proper divisors then sum to $\sigma(n) - n$.
Definition (Perfect number).
A positive integer $n$ is perfect when it equals the sum of its proper divisors, that is, when $\sigma(n) = 2n.$
Perfect numbers are scarce: after $6$, $28$, $496$, and $8128$, the next one has eight digits. A Mersenne prime is a prime of the form $2^{p} - 1$, and the following theorem explains the scarcity.
Theorem (Euclid–Euler theorem).
An even number is perfect if and only if it has the form $2^{p-1}(2^{p} - 1)$ with $2^{p} - 1$ prime. There is thus one even perfect number for each Mersenne prime, and no others.
Finding even perfect numbers therefore amounts to finding Mersenne primes. For $2^{p} - 1$ to be prime, the exponent $p$ must itself be prime, but a prime exponent does not guarantee it, so each candidate must be tested. Whether any odd perfect number exists remains unknown.
Ways to work on it
- Walkthrough. The sigma function, the perfect-number condition, and Euclid–Euler.
- Proof. Prove Euclid's direction: a Mersenne prime gives a perfect number.
- Practice. Decide whether a Mersenne number is prime.
- Hardest. Build a perfect number from a Mersenne prime and verify (n) = 2n.
Not sure where to start? Take the ten-question placement test.