Perfect Number Checker – Divisor Sums, Abundance and Deficiency
A perfect number is a positive whole number that equals the sum of its own proper divisors — every divisor except the number itself. The smallest is 6, because 1 + 2 + 3 = 6. This checker finds every proper divisor of the value you type, adds them up, and tells you whether the result is perfect, abundant or deficient, together with the full divisor list and a running total.
The Three Classifications
Write s(n) for the sum of the proper divisors of n, known as the aliquot sum. If s(n) = n the number is perfect. If s(n) > n it is abundant, and the gap is called the abundance or excess — 12 has divisors 1, 2, 3, 4 and 6 totalling 16, so it is abundant by 4. If s(n) < n the number is deficient, and the gap is its deficiency: 8 gives 1 + 2 + 4 = 7, one short. Every prime number is as deficient as it can be, since 1 is its only proper divisor. The number 1 is a special case — it has no proper divisors, so s(1) = 0 and 1 is always deficient, never perfect.
How the Divisors Are Found
Testing every candidate below n would be hopelessly slow for large inputs. Instead the calculator tests each i from 1 up to √n and, whenever n % i === 0, records both i and its partner n / i. Divisors always come in such pairs around the square root, so one pass over √n values finds them all. Checking a twelve-digit number then costs about a million steps rather than a trillion — the difference between instant and impossible in a browser.
The Euclid–Euler Theorem
Around 300 BCE, Euclid proved in the Elements that whenever 2^p − 1 is prime, the product 2^(p−1) × (2^p − 1) is perfect. Two thousand years later Euler proved the converse: every even perfect number takes that form. Primes of the shape 2^p − 1 are called Mersenne primes, and each one produces exactly one perfect number. With p = 2 you get 6, with p = 3 you get 28, then 496, 8128, and a jump straight to 33550336. The generator mode of this tool builds the candidate for any exponent you choose and runs the Lucas–Lehmer test to confirm whether the Mersenne factor really is prime.
p is composite then 2^p − 1 is composite too. The reverse fails: p = 11 is prime, yet 2^11 − 1 = 2047 = 23 × 89, so 2047 is not a Mersenne prime and 2^10 × 2047 is not perfect.Why Perfect Numbers Are So Rare
Scanning from 1 to 10,000 finds only 6, 28, 496 and 8128. The next one, 33550336, is more than four thousand times further along, and the one after that has ten digits. Abundant numbers, by contrast, are common — roughly a quarter of all integers are abundant, and every multiple of 6 beyond 6 itself is abundant. The range scan reports the counts of all three classes so you can see this imbalance directly, along with the smallest abundant value in the interval, which is 12 whenever the scan starts at 1. Odd abundant numbers are far scarcer: the first is 945.
The Open Question About Odd Perfect Numbers
Every perfect number ever found is even. Whether an odd perfect number exists is one of the oldest unsolved problems in mathematics, dating back to Nicomachus in the first century. Exhaustive computation has ruled out everything below 10^1500, and any odd perfect number would need at least ten distinct prime factors and a prime power component above 10^62, yet no proof of impossibility exists. Because of this result, scans over very large intervals can safely list the known even perfect numbers instead of grinding through every value.
Reading the Output
Alongside the classification the tool reports the abundancy index σ(n)/n, which counts all divisors including n itself. It equals exactly 2 for a perfect number, sits above 2 for abundant numbers and below 2 for deficient ones — a single figure that captures the whole comparison. The running-sum table shows how far each successive divisor takes you toward the target, the divisor chips give the complete factor structure, and the CSV export carries every divisor with its cumulative total for use in a spreadsheet or a homework write-up.