n is
Proper divisors s(n)
All divisors σ(n)
Divisors

    Show

    More information about perfect numbers

    Perfect number finder

    6 = 1 + 2 + 3 and 28 = 1 + 2 + 4 + 7 + 14: a perfect number is the sum of its proper divisors, the divisors smaller than itself. Most numbers miss. The proper divisors of 12 add up to 16, too much, so 12 is abundant; those of 10 add up to 8, too little, so 10 is deficient. Enter any number up to 10^19 to see its divisors added up and drawn against the number itself, follow its aliquot sequence to 1 or into a cycle, colour 1 to 100,000 by class, and look up the perfect numbers made from the known Mersenne primes. Enter a whole number up to 10^19, or choose a worked example. Divisors adds up its proper divisors, the divisors smaller than the number itself: if they add up to the number it is perfect, if to more it is abundant, and if to less it is deficient. The bar of the divisors is drawn against a bar as long as the number; point at a piece to see which divisor it is. Sequence repeats the step, n → s(n) → s(s(n)) …, until it reaches 1, a perfect number or a cycle; click a point to open that number. Range colours every number from 1 to N by its class; click a cell or a chip to open that number. Known lists the perfect numbers made from the known Mersenne primes; click one of the first eight to open it.

    How it works

    1. Enter a number, or pick a worked example such as 28, the first odd abundant number 945 or the amicable number 220.
    2. Read the verdict and the sum of the proper divisors written out, see the divisors stacked against a bar as long as the number, and switch to Sequence to follow n → s(n) → s(s(n)) until it ends.
    3. Open Range to colour every number up to 100,000 by class, or Known for the perfect numbers of the known Mersenne primes, and click a number to open it.

    Perfect, abundant or deficient

    Add up the divisors of n that are smaller than n, and compare. For 12 they are 1, 2, 3, 4 and 6, which make 16, so 12 is abundant; for 15 they are 1, 3 and 5, which make 9, so 15 is deficient; for 496 they make exactly 496. About three numbers in four are deficient, among them every prime, whose only proper divisor is 1. Of the numbers up to 100,000, 24,795 are abundant and only four are perfect: 6, 28, 496 and 8,128. Abundant numbers are nearly all even: the first odd one is 945, and the first that is not divisible by 3 is 5,391,411,025.

    Aliquot sequences, amicable pairs and cycles

    Replace a number by the sum of its proper divisors and repeat. 12 goes to 16, 15, 9, 4, 3 and 1, and stops there, as every sequence does once it reaches a prime. A perfect number stays where it is. 220 goes to 284, and 284 back to 220: an amicable pair, known since antiquity. 12,496 comes back to itself after five steps and 14,316 after 28, the sociable cycles Paul Poulet found in 1918. Some sequences climb for a long time before they come down: 138 rises to 179,931,895,322 and reaches 1 after 177 steps. For 276 nobody knows: its sequence has been followed for more than a thousand steps without reaching an end.

    Frequently asked questions

    What is a perfect number?

    A whole number that equals the sum of its proper divisors, the divisors smaller than itself. 6 = 1 + 2 + 3 is the smallest, followed by 28, 496 and 8,128, the four the ancient Greeks knew. The fifth, 33,550,336, is already much larger, and 52 perfect numbers were known as of late 2024.

    Are all perfect numbers even?

    Every perfect number found so far is even, and Euler proved that every even perfect number has the form 2^(p−1)(2^p − 1), where 2^p − 1 is prime, a Mersenne prime. Whether an odd perfect number exists is one of the oldest open questions in mathematics; if one does, it is larger than 10^1500.

    What do σ(n) and s(n) mean?

    σ(n) is the sum of all the divisors of n, n included, and s(n) = σ(n) − n is the sum of the proper ones, the aliquot sum. σ can be worked out from the prime factors: 12 = 2² × 3, so σ(12) = (1 + 2 + 4) × (1 + 3) = 28 and s(12) = 16. A number is perfect when σ(n) = 2n, that is when its abundancy σ(n)/n is exactly 2.

    What are amicable numbers?

    Two numbers where each is the sum of the other's proper divisors. The proper divisors of 220 add up to 284, and those of 284, 1, 2, 4, 71 and 142, add up to 220. Fermat announced the pair 17,296 and 18,416 in 1636, while the much smaller pair 1,184 and 1,210 was overlooked until a 16-year-old, Nicolò Paganini, found it in 1866. There are 13 pairs below 100,000.

    How large a number can I check?

    Any whole number up to 10^19. The app factors it with trial division, Pollard's rho method and a Miller–Rabin test that is exact in this range, so even 19-digit numbers take a fraction of a second. Aliquot sequences are followed for up to 1,000 steps while their terms stay below 10^19, and everything runs in your browser.

    Ready to try it?

    Open PictorX in your browser — no install, no credit card required to start.

    Go to Editor