⭐Perfect Number Checker

Classify a number as perfect, abundant or deficient from its aliquot sum, with abundancy index and amicable pairs

Perfect numbers and the aliquot sum

Before adding up divisors you have to decide whether the number itself counts. The sum that includes it is written σ(n), and the sum that leaves it out is the aliquot sum s(n), so s(n) = σ(n) − n. The perfect number test always uses the aliquot sum: when s(n) equals n, the number is perfect. The proper divisors of 6 are 1, 2 and 3 and they add to exactly 6, which makes it the smallest perfect number, followed by 28, 496 and 8128.

This checker reports both sums separately and then classifies the number as perfect, abundant or deficient from the aliquot sum. If the aliquot sum is larger than the number it is abundant, and if it is smaller the number is deficient. 12 has an aliquot sum of 16 and is abundant, while every prime is deficient because its only proper divisor is 1. The abundancy index σ(n) ÷ n is listed too, and it lands on exactly 2 for a perfect number.

When a number has 30 proper divisors or fewer, the expanded sum appears so you can check it by eye. If feeding the aliquot sum back in returns the original number, the two form an amicable pair and that row shows up as well, with 220 and 284 as the classic example. Divisors are found by testing up to the square root, so values up to one billion resolve quickly. Decimal and negative inputs are not supported.

Frequently Asked Questions

What is a perfect number?

A number whose proper divisors, meaning every divisor except the number itself, add up to the number. The proper divisors of 6 are 1, 2 and 3 and they sum to 6, and the next perfect numbers are 28, 496 and 8128.

How does the divisor sum differ from the aliquot sum?

The divisor sum written as sigma(n) includes the number itself, while the aliquot sum s(n) leaves it out, so s(n) equals sigma(n) minus n. The perfect number test always uses the aliquot sum.

What makes two numbers amicable?

Each one's aliquot sum equals the other number. The aliquot sum of 220 is 284 and the aliquot sum of 284 is 220, so they form an amicable pair.