How this calculation works
For a prime p the sum is 1+p. To obtain the proper-divisor sum, subtract n from the reported total.
σ(n) = product of (1 + p + ⋯ + pᵉ)A worked example
28 has divisors 1, 2, 4, 7, 14 and 28, which sum to 56.
Good to know
The input must be positive.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Build all divisors by choosing prime powers
The number 28 factors as 2² × 7. Every divisor chooses one of 1, 2 and 4 from the power of two and one of 1 and 7 from the power of seven. Multiplying these choices gives 1, 2, 4, 7, 14 and 28. Their sum is 56.
The distributive law collects the same sum as (1 + 2 + 4)(1 + 7) = 7 × 8 = 56. For a general prime power pᵉ, the contribution is 1 + p + … + pᵉ. Multiplying one contribution for each distinct prime produces the sum over every possible divisor choice.
Include the original number when using the sigma function
This output includes 28 itself. The proper-divisor sum omits that final divisor, so it is 56 − 28 = 28. The Abundant, deficient or perfect number calculator performs that subtraction before comparing the sum with the input. Confusing these two sums would change the classification.
For a prime p, the only divisors are 1 and p, and their sum is p + 1. For the input 1, the divisor list contains only 1 and the sum is 1. Zero is excluded because every positive integer divides zero, giving no finite list to sum. Distinct prime factors are essential in the product formula so each divisor is generated once.
Read more: NIST DLMF definitions of divisor functions (opens in a new tab) ↗
A few questions, answered
How many divisors does 28 have?
Its exponent choices give (2 + 1)(1 + 1) = 6 positive divisors.
Can I use paired divisors as a check?
Yes. The pairs 1 × 28, 2 × 14 and 4 × 7 recover the same six divisors.