Divisor Function Calculator
Calculate τ(n) and σ(n) - the count and sum of all divisors of a positive integer.
Enter a positive integer (max 1,000,000)
The divisor functions are fundamental arithmetic functions in number theory that analyze the divisors of a positive integer n.
τ(n) - Divisor Count Function: Also written as d(n) or σ₀(n), this counts the total number of positive divisors of n, including 1 and n itself.
τ(12) = 6 because 12 has divisors: 1, 2, 3, 4, 6, 12
σ(n) - Divisor Sum Function: Also written as σ₁(n), this calculates the sum of all positive divisors of n.
σ(12) = 1 + 2 + 3 + 4 + 6 + 12 = 28
Number Classification: Based on the aliquot sum s(n) = σ(n) - n (sum of proper divisors, excluding n itself):
- Perfect: s(n) = n (e.g., 6, 28, 496, 8128)
- Abundant: s(n) > n (e.g., 12, 18, 20, 24)
- Deficient: s(n) < n (e.g., 1, 2, 3, 4, 5, 7, 8)
Formula for Prime Powers: For a prime p and positive integer k:
τ(p^k) = k + 1 and σ(p^k) = (p^(k+1) - 1) / (p - 1)
Multiplicative Property: Both τ and σ are multiplicative functions, meaning for coprime integers a and b: τ(ab) = τ(a) × τ(b) and σ(ab) = σ(a) × σ(b).
Applications: Divisor functions appear throughout number theory, including in the study of perfect numbers (connected to Mersenne primes), amicable numbers, and the Riemann hypothesis through their relationship with the Riemann zeta function.
Frequently Asked Questions
What is a perfect number?
A perfect number equals the sum of its proper divisors (all divisors except itself). The first four perfect numbers are 6 (1+2+3), 28 (1+2+4+7+14), 496, and 8128. All known perfect numbers are even, and each corresponds to a Mersenne prime via the formula 2^(p-1) x (2^p - 1). Whether odd perfect numbers exist remains one of mathematics' oldest unsolved problems.
What's the difference between tau and sigma functions?
The tau function (also called d(n)) counts the number of divisors, while the sigma function sums all divisors. For example, for n=12: tau(12) = 6 (the divisors are 1, 2, 3, 4, 6, 12) and sigma(12) = 28 (1+2+3+4+6+12). Both are multiplicative functions, meaning for coprime a and b: tau(ab) = tau(a) x tau(b).
What are abundant and deficient numbers?
These classifications compare a number to its aliquot sum (sum of proper divisors). Abundant numbers have aliquot sum greater than the number itself (e.g., 12's proper divisors sum to 16). Deficient numbers have aliquot sum less than the number (e.g., 8's proper divisors sum to 7). Most numbers are deficient, but all multiples of perfect numbers are abundant.
How do I calculate the number of divisors from prime factorization?
If n = p1^a1 x p2^a2 x ... x pk^ak, then tau(n) = (a1+1)(a2+1)...(ak+1). For example, 360 = 2^3 x 3^2 x 5^1, so tau(360) = (3+1)(2+1)(1+1) = 4 x 3 x 2 = 24 divisors. This formula works because each divisor uses between 0 and ai copies of each prime factor pi.