Skip to content
MasterMath

Perfect Number Calculator

Find every perfect number up to a limit. There are only four below ten thousand, and each one fits Euclid's formula exactly.

Perfect numbers

—

Perfect numbers—
How many there are—
The largest found—
Euclid's form—

How this was worked out

    The rule

    perfect if the proper divisors add to the number · Euclid: 2^(p−1) × (2^p − 1)

    Why it works

    A perfect number equals the sum of its proper divisors. Euclid showed that whenever 2^p − 1 is prime, the product 2^(p−1) × (2^p − 1) is perfect, and Euler proved two thousand years later that every even perfect number has that form.

    How to do it by hand

    1. For each number, find its proper divisors
    2. Add them up
    3. If the total equals the number, it is perfect
    4. Check it against Euclid's formula

    What is worth knowing

    Perfect numbers are astonishingly scarce: 6, 28, 496, 8128, and then nothing until 33,550,336. Only 51 are known, and each new one is found alongside a new Mersenne prime, because the two are tied by Euclid's formula. The primes 2^p − 1 that generate them are named after Mersenne, and searching for them is what the distributed GIMPS project has been doing since 1996. Two things remain unknown after two millennia: whether any odd perfect number exists, and whether the even ones ever run out.

    Frequently asked questions

    What is a perfect number?

    One whose proper divisors add up to itself. 6 = 1 + 2 + 3, and 28 = 1 + 2 + 4 + 7 + 14.

    How many are there?

    Only 51 are known, and whether the list is infinite is unresolved. The first four are 6, 28, 496 and 8128.

    What is Euclid's formula?

    Whenever 2^p − 1 is prime, 2^(p−1) × (2^p − 1) is perfect. Euler later proved every even perfect number has this form.

    What are Mersenne primes?

    Primes of the form 2^p − 1. Each one generates a perfect number, which is why the two searches are the same search.