Perfect Number Checker
Our free number theory calculator solves perfect number problems. Get worked examples, visual aids, and downloadable results.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Perfect Number Checker
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Perfect: sigma(n) - n = n, i.e., sum of proper divisors = n
Worked example โ 28 is PERFECT | sigma(28) = 56 | Abundancy index = 2.0000
Formula
Perfect: sigma(n) - n = n, i.e., sum of proper divisors = n
A number n is perfect when the sum of all its proper divisors (divisors less than n) equals n itself. The divisor function sigma(n) sums all divisors including n. For even perfect numbers: n = 2^(p-1) * (2^p - 1) where 2^p - 1 is a Mersenne prime.
Worked Examples
Example 1: Checking if 28 is a Perfect Number
Problem:Find all proper divisors of 28 and determine if their sum equals 28.
Solution:Proper divisors of 28: 1, 2, 4, 7, 14 Sum = 1 + 2 + 4 + 7 + 14 = 28 28 = 28, so 28 IS a perfect number. Mersenne connection: 28 = 2^2 * (2^3 - 1) = 4 * 7 Mersenne prime: 7 = 2^3 - 1 with exponent p = 3
Result:28 is PERFECT | sigma(28) = 56 | Abundancy index = 2.0000
Example 2: Classifying the Number 12
Problem:Determine whether 12 is deficient, perfect, or abundant.
Solution:Proper divisors of 12: 1, 2, 3, 4, 6 Sum = 1 + 2 + 3 + 4 + 6 = 16 16 > 12, so 12 is ABUNDANT. Abundance = 16 - 12 = 4 Abundancy index = sigma(12)/12 = 28/12 = 2.333
Result:12 is ABUNDANT | Sum of divisors: 16 | Abundance: +4
Frequently Asked Questions
What is a perfect number and how is it defined?
A perfect number is a positive integer that equals the sum of its proper divisors, which are all divisors excluding the number itself. The first four perfect numbers are 6 (1+2+3), 28 (1+2+4+7+14), 496, and 8128. These numbers have fascinated mathematicians since antiquity. Euclid proved around 300 BCE that if 2^p - 1 is prime (a Mersenne prime), then 2^(p-1) * (2^p - 1) is a perfect number. Euler later proved that all even perfect numbers have this form. Whether any odd perfect numbers exist remains one of the oldest unsolved problems in mathematics, with no examples found despite extensive computer searches up to 10^2200.
What are abundant and deficient numbers?
Every positive integer falls into one of three categories based on the sum of its proper divisors compared to itself. A deficient number has a divisor sum less than itself (most numbers are deficient, including all primes and prime powers). An abundant number has a divisor sum greater than itself, with 12 being the smallest (1+2+3+4+6 = 16 > 12). A perfect number has a divisor sum exactly equal to itself. Approximately 75.5% of positive integers are deficient, about 24.7% are abundant, and perfect numbers are extraordinarily rare. The density of abundant numbers approaches a specific constant, while perfect numbers have density zero among the integers.
How are perfect numbers connected to Mersenne primes?
The Euclid-Euler theorem establishes a beautiful one-to-one correspondence between even perfect numbers and Mersenne primes. Euclid showed that whenever 2^p - 1 is prime, the number 2^(p-1) * (2^p - 1) is perfect. Two thousand years later, Euler proved the converse: every even perfect number has exactly this form. So 6 = 2^1 * 3 corresponds to the Mersenne prime 3 = 2^2 - 1, and 28 = 2^2 * 7 corresponds to the Mersenne prime 7 = 2^3 - 1. Since there are currently 51 known Mersenne primes, there are exactly 51 known even perfect numbers. Finding a new Mersenne prime automatically yields a new perfect number.
Do odd perfect numbers exist?
The existence of odd perfect numbers is one of the most famous unsolved problems in number theory, open for over 2,000 years. No odd perfect number has ever been found, and most mathematicians believe none exist. However, a proof of their nonexistence has eluded researchers. If one exists, it must satisfy stringent conditions: it must be greater than 10^2200, have at least 101 prime factors (counting multiplicity), have a special prime factor of the form p^a where p is congruent to 1 modulo 4, and cannot be divisible by 105. Despite these constraints, a complete proof remains elusive. The problem illustrates how seemingly simple definitions can lead to extraordinarily difficult mathematical questions.
What is the abundancy index and what does it measure?
The abundancy index of a positive integer n is the ratio sigma(n)/n, where sigma(n) is the sum of all divisors of n (including n itself). For a perfect number, the abundancy index is exactly 2, since sigma(n) = 2n. For deficient numbers it is less than 2, and for abundant numbers it is greater than 2. The abundancy index provides a continuous measure of how far a number is from being perfect. Prime numbers have an abundancy index of (p+1)/p, which approaches 1 as p grows. Highly composite numbers tend to have large abundancy indices. Numbers with abundancy index exactly equal to an integer k are called k-perfect or multiply perfect numbers.
What are multiply perfect numbers?
A multiply perfect number (or multiperfect number) is a positive integer n whose divisor sum sigma(n) is a multiple of n. Ordinary perfect numbers are 2-perfect since sigma(n) = 2n. The smallest 3-perfect number is 120, with sigma(120) = 360 = 3 * 120. The smallest 4-perfect number is 30,240, and the smallest 5-perfect number is 14,182,439,040. As the multiplicity k increases, the numbers become extraordinarily large and sparse. There are only about 6 known 11-perfect numbers. Finding and studying multiply perfect numbers requires sophisticated factoring algorithms and extensive computation. They connect to questions about the structure of the divisor function in analytic number theory.
What are amicable numbers and how do they relate to perfect numbers?
Amicable numbers are pairs of distinct numbers where each is the sum of the proper divisors of the other. The smallest amicable pair is 220 and 284: the proper divisors of 220 sum to 284, and the proper divisors of 284 sum to 220. A perfect number can be thought of as amicable with itself. Amicable numbers were known to the Pythagoreans, and Thabit ibn Qurra discovered a formula for generating some pairs in the 9th century. Euler found over 60 amicable pairs. As of recent counts, billions of amicable pairs are known. Sociable numbers extend this concept to chains of length greater than 2, where the divisor-sum function cycles through several numbers before returning to the start.
What properties do the digits of perfect numbers have?
Even perfect numbers exhibit fascinating digital properties. Every even perfect number greater than 6 ends in 6 or 8 when written in base 10, alternating in a regular pattern. Specifically, if the Mersenne exponent p is congruent to 3 mod 4, the perfect number ends in 8; if p is congruent to 1 mod 4, it ends in 6. Additionally, every even perfect number except 6 is the sum of consecutive odd cubes: 28 = 1^3 + 3^3, 496 = 1^3 + 3^3 + 5^3 + 7^3, and so on. The digital root of every even perfect number (except 6) is 1, meaning if you repeatedly sum the digits, you always reach 1. These patterns emerge from the algebraic structure of the Euclid-Euler formula.
How were perfect numbers viewed in ancient mathematics?
Perfect numbers held deep mystical and philosophical significance in ancient cultures. The Pythagoreans (6th century BCE) considered them sacred, believing the perfection of 6 (the number of creation days) and 28 (the lunar cycle in days) reflected divine mathematical order. Nicomachus of Gerasa classified numbers as deficient, perfect, or abundant around 100 CE, comparing them to moral qualities. Augustine of Hippo wrote that God created the world in six days because six is perfect. The ancient Greeks knew only the first four perfect numbers: 6, 28, 496, and 8128. These numbers influenced number mysticism throughout the Middle Ages and Renaissance, inspiring both serious mathematical research and pseudoscientific numerology.
What computational methods are used to search for perfect numbers?
Since every even perfect number corresponds to a Mersenne prime via the formula 2^(p-1) * (2^p - 1), searching for perfect numbers reduces to testing Mersenne numbers for primality. The Lucas-Lehmer test is the primary method: compute the sequence s(0)=4, s(i) = s(i-1)^2 - 2 mod (2^p - 1), and check if s(p-2) = 0. The GIMPS (Great Internet Mersenne Prime Search) project uses this test on distributed volunteer computers, currently testing exponents near 100 million. Each test requires weeks of computation. Efficient implementation uses specialized FFT-based multiplication algorithms for the enormous numbers involved. Trial factoring and P-1 factoring are used first to eliminate composite candidates cheaply before running the full Lucas-Lehmer test.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎAbundant Number Checker
Calculate abundant number checker with inputs, formulas, and instant results.
๐งฎDeficient Number Checker
Calculate deficient number checker with inputs, formulas, and instant results.
๐งฎSum of a Linear Number Sequence Calculator
Calculate sum of alinear number sequence with inputs, formulas, and instant results.
๐งฎComplex Number Calculator
Calculate complex number with inputs, formulas, and instant results.
๐งฎPerfect Square Trinomial Calculator
Calculate perfect square trinomial with inputs, formulas, and instant results.
๐งฎPerfect Cube Calculator
Calculate perfect cube with inputs, formulas, and instant results.
๐งฎPerfect Square Calculator
Calculate perfect square with inputs, formulas, and instant results.
๐งฎPrime Number Calculator
Calculate prime number with inputs, formulas, and instant results.