DigitHelm

Perfect Number Checker

Check if a number is perfect, abundant, or deficient and find all its proper divisors.

Known perfect numbers: 6 · 28 · 496 · 8,128 · 33,550,336 · …

FIRST 5 KNOWN PERFECT NUMBERS

= 2^1 × (2^2 − 1)Mersenne prime: 2
= 2^2 × (2^3 − 1)Mersenne prime: 3
= 2^4 × (2^5 − 1)Mersenne prime: 7
= 2^6 × (2^7 − 1)Mersenne prime: 31
= 2^12 × (2^13 − 1)Mersenne prime: 8,191

What Is the Perfect Number Checker?

This perfect number checker determines whether any positive integer is perfect, abundant, or deficient by summing its proper divisors using an O(√n) algorithm. It shows the full divisor list, abundance value, Mersenne prime connection for perfect numbers, and a range finder that locates all perfect numbers up to 1,000,000.

  • O(√n) algorithm: Finds divisors by checking up to √n, far faster than O(n) for large inputs.
  • Three classifications: Perfect (σ = n), Abundant (σ > n), Deficient (σ < n).
  • Abundance display: Shows σ(n) − n, the surplus or deficit relative to n.
  • Mersenne connection: Identifies which Mersenne prime generates each known perfect number.
  • Range finder: Find all perfect numbers from 2 to any N ≤ 1,000,000.
  • Known perfect numbers table: Clickable list of the first 5 perfect numbers with Mersenne formulas.

Formula

σ(n) = sum of proper divisors  ·  Perfect: σ(n) = n  ·  Abundant: σ(n) > n  ·  Deficient: σ(n) < n
Even perfect numbers: n = 2^(p−1) × (2^p − 1) where 2^p − 1 is a Mersenne prime
TypeConditionExamples
Perfectσ(n) = n6, 28, 496, 8128, 33550336
Abundantσ(n) > n12 (σ=16), 18 (σ=21), 20 (σ=22)
Deficientσ(n) < n8 (σ=7), 10 (σ=8), most primes
Mersenne prime2^p − 1 is primep = 2,3,5,7,13,17,19,31,61…

How to Use

  1. 1Enter any positive integer in the input field.
  2. 2Press Enter or click Check Number.
  3. 3Read the type (Perfect / Abundant / Deficient), divisor list, and sum.
  4. 4For perfect numbers, the Mersenne prime formula is displayed.
  5. 5Expand the range finder to search for all perfect numbers up to N.
  6. 6Click any number in the known perfect numbers table to check it.
  7. 7Click Clear to reset.

Example Calculation

Checking 28

n = 28 Proper divisors: 1, 2, 4, 7, 14 Sum = 1 + 2 + 4 + 7 + 14 = 28 28 is PERFECT, σ(28) = 28 Mersenne connection: 28 = 2^(3−1) × (2³ − 1) = 4 × 7 2³ − 1 = 7 is a Mersenne prime (p = 3)

Why are perfect numbers so rare?

Only 51 perfect numbers are known as of 2024. All known perfect numbers are even and follow Euler's formula 2^(p−1)(2^p−1). Whether any odd perfect numbers exist is one of the oldest unsolved problems in mathematics, none have been found, and any odd perfect number would need to be astronomically large (at least 10^1500).

Understanding Perfect Number Checker

What Makes a Number Perfect?

A perfect number equals the sum of all its positive divisors except itself (its proper divisors). The ancient Greeks found this property in 6 (1+2+3 = 6) and 28 (1+2+4+7+14 = 28) and considered them to have mystical significance. Perfect numbers are exceedingly rare, only 51 are known, and the largest known perfect number has over 49 million digits.

Abundant and Deficient Numbers

Abundant numbers have a proper divisor sum greater than the number itself, they are "over-supplied" with divisors. The smallest is 12 (1+2+3+4+6 = 16 > 12). Deficient numbers have divisor sums less than themselves, most numbers are deficient. All prime numbers are deficient (their only proper divisor is 1). The integers split roughly into about 25% abundant and 75% deficient, with perfect numbers sprinkled infinitely rarely between.

The Mersenne Prime Connection

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). The correspondence is one-to-one: every Mersenne prime generates exactly one even perfect number, and vice versa. Finding new perfect numbers reduces to finding new Mersenne primes, which is what the GIMPS (Great Internet Mersenne Prime Search) distributed computing project has been doing since 1996.

pMersenne prime 2^p−1Perfect numberDigits
2361
37282
5314963
71278,1284
138,19133,550,3368
17131,0718,589,869,05610
19524,287137,438,691,32812

Frequently Asked Questions

What is a perfect number?

A perfect number is a positive integer equal to the sum of its proper divisors (all positive divisors except itself). The first four are 6, 28, 496, and 8128:

6: 1+2+3 = 6 ✓ 28: 1+2+4+7+14 = 28 ✓ 496: 1+2+4+8+16+31+62+124+248 = 496 ✓

Perfect numbers are one of the oldest topics in number theory, studied by Euclid around 300 BCE. Only 51 are known today.

What is an abundant number?

An abundant number has a proper divisor sum greater than itself. The smallest abundant number is 12:

12: divisors 1+2+3+4+6 = 16 > 12 → abundant (abundance = 4) 18: divisors 1+2+3+6+9 = 21 > 18 → abundant (abundance = 3) 20: divisors 1+2+4+5+10 = 22 > 20 → abundant (abundance = 2)

About 25% of integers are abundant. All multiples of abundant numbers (greater than the abundant number) are also abundant.

What is a deficient number?

A deficient number has a proper divisor sum less than itself. Most numbers are deficient. All prime numbers are deficient since their only proper divisor is 1:

7 (prime): divisors 1. Sum = 1 < 7 → deficient 8: divisors 1+2+4 = 7 < 8 → deficient 10: divisors 1+2+5 = 8 < 10 → deficient

Powers of 2 (2, 4, 8, 16, …) are always deficient since their divisors are 1, 2, 4, … up to half the number, which sum to one less than the number itself.

How is the O(√n) algorithm faster than O(n)?

For each divisor d ≤ √n, there is a paired divisor n/d ≥ √n. So we only need to check up to √n and collect both d and n/d when d divides n. For n = 1,000,000: O(n) checks 1 million candidates; O(√n) checks only 1,000, 1000× faster.

For n = 28, √28 ≈ 5.3: Check 1: 28/1=28, add 1 (not 28, it's n itself) Check 2: 28/2=14, add 2 and 14 Check 4: 28/4=7, add 4 and 7 Done. Divisors: {1, 2, 4, 7, 14}

Are there any odd perfect numbers?

None are known, this is one of the oldest unsolved problems in mathematics. Euler proved all even perfect numbers have the Mersenne form. Whether odd perfect numbers exist is unknown. Any odd perfect number would have to be greater than 10^1500, have at least 101 prime factors, and satisfy dozens of other constraints. Most mathematicians suspect none exist, but no proof has been found.

What is a Mersenne prime and how does it relate to perfect numbers?

A Mersenne prime is a prime of the form 2^p − 1 (one less than a power of 2). Euclid proved that if 2^p − 1 is prime, then 2^(p−1)(2^p − 1) is perfect. Euler proved the converse: every even perfect number has this form. So finding even perfect numbers is exactly equivalent to finding Mersenne primes. Known Mersenne prime exponents: 2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, …

What is the abundance of a number?

Abundance = σ(n) − n where σ(n) is the sum of proper divisors. Positive abundance → abundant; zero → perfect; negative → deficient.

n = 12: σ = 16, abundance = 16−12 = +4 (abundant) n = 6: σ = 6, abundance = 6−6 = 0 (perfect) n = 8: σ = 7, abundance = 7−8 = −1 (deficient)

The abundancy index σ(n)/n is another measure: perfect numbers have index exactly 2; abundant numbers index > 2; deficient index < 2.

Related Calculators