Divisor Function Calculator
Solve divisor function problems step-by-step with our free calculator. See formulas, worked examples, and clear explanations.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Divisor Function Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: sigma_k(n) = Sum of d^k for all divisors d of n
Worked example โ sigma_0(60) = 12 | sigma_1(60) = 168 | sigma_2(60) = 5460 | 60 is abundant (aliquot sum = 108 > 60)
Formula
sigma_k(n) = Sum of d^k for all divisors d of n
The divisor function sigma_k(n) sums the kth powers of all positive divisors of n. When k=0, it counts the number of divisors. When k=1, it gives the sum of divisors. The function is multiplicative: for coprime m and n, sigma_k(mn) = sigma_k(m) * sigma_k(n).
Worked Examples
Example 1: Divisor Function Values for n = 60
Problem:Compute sigma_0(60), sigma_1(60), and sigma_2(60).
Solution:60 = 2^2 * 3 * 5, divisors: {1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60} sigma_0(60) = 12 (count of divisors) sigma_1(60) = 1+2+3+4+5+6+10+12+15+20+30+60 = 168 sigma_2(60) = 1+4+9+16+25+36+100+144+225+400+900+3600 = 5460 From factorization: sigma_0 = (2+1)(1+1)(1+1) = 12 sigma_1 = (7)(4)(6) = 168
Result:sigma_0(60) = 12 | sigma_1(60) = 168 | sigma_2(60) = 5460 | 60 is abundant (aliquot sum = 108 > 60)
Example 2: Checking if 28 is a Perfect Number
Problem:Verify that 28 is a perfect number using the divisor function.
Solution:28 = 2^2 * 7 Divisors: {1, 2, 4, 7, 14, 28} Proper divisors: {1, 2, 4, 7, 14} Aliquot sum = 1 + 2 + 4 + 7 + 14 = 28 sigma_1(28) = 1+2+4+7+14+28 = 56 = 2*28 28 = 2^(3-1) * (2^3 - 1) = 4 * 7, and 7 is a Mersenne prime (2^3 - 1).
Result:28 is PERFECT | sigma_1(28) = 56 = 2*28 | Proper divisors sum to exactly 28
Frequently Asked Questions
What is the divisor function and what does sigma notation mean?
The divisor function, denoted sigma_k(n) or sometimes d_k(n), is a function from number theory that sums the kth powers of all positive divisors of n. For k=0, sigma_0(n) counts the total number of divisors (often written d(n) or tau(n)). For k=1, sigma_1(n) gives the sum of all divisors. For k=2, sigma_2(n) gives the sum of squares of divisors. The general formula is sigma_k(n) = sum of d^k for all positive divisors d of n. For example, for n=12 with divisors {1,2,3,4,6,12}: sigma_0(12) = 6 (six divisors), sigma_1(12) = 28 (sum = 1+2+3+4+6+12), and sigma_2(12) = 210 (sum of squares). The divisor function is multiplicative, meaning sigma_k(mn) = sigma_k(m)*sigma_k(n) when gcd(m,n) = 1. This multiplicative property allows efficient computation from prime factorizations.
How do you compute the divisor function from a prime factorization?
The multiplicative property of the divisor function makes prime factorization the most efficient computation method. If n = p1^a1 * p2^a2 * ... * pr^ar, then sigma_k(n) = product of sigma_k(pi^ai) for each prime factor. For each prime power, sigma_0(p^a) = a+1 (counting divisors: 1, p, p^2, ..., p^a). For k > 0, sigma_k(p^a) = (p^(k*(a+1)) - 1) / (p^k - 1), which is a geometric series sum. For sigma_1, this simplifies to sigma_1(p^a) = (p^(a+1) - 1) / (p - 1). For example, 60 = 2^2 * 3 * 5, so sigma_0(60) = (2+1)(1+1)(1+1) = 12, and sigma_1(60) = (2^3-1)/(2-1) * (3^2-1)/(3-1) * (5^2-1)/(5-1) = 7 * 4 * 6 = 168. This factorization approach converts a problem requiring finding all divisors into simple arithmetic on prime powers, dramatically reducing computation time for large numbers.
What are perfect, abundant, and deficient numbers?
These classifications are based on comparing a numbers sum of proper divisors (aliquot sum) to the number itself. A perfect number equals the sum of its proper divisors: sigma_1(n) = 2n, or equivalently, the aliquot sum equals n. The known perfect numbers are 6, 28, 496, 8128, and so on, all related to Mersenne primes by the formula 2^(p-1) * (2^p - 1) when 2^p - 1 is prime. An abundant number has sigma_1(n) > 2n, meaning its proper divisors sum to more than the number itself. The smallest abundant number is 12, with divisors summing to 16 > 12. A deficient number has sigma_1(n) < 2n. Most numbers are deficient; all prime numbers are deficient since their only proper divisor is 1. About 75% of positive integers are deficient, about 25% are abundant, and perfect numbers are extraordinarily rare. The study of these classifications dates back to ancient Greek mathematicians who considered perfect numbers to have mystical significance.
What is a highly composite number and how does it relate to the divisor function?
A highly composite number is a positive integer with more divisors than any smaller positive integer. In other words, n is highly composite if sigma_0(n) > sigma_0(m) for all m < n. The sequence of highly composite numbers begins 1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 1260, 2520, and was extensively studied by Ramanujan in his 1915 paper. These numbers have specific structural properties: their prime factorization uses consecutive primes starting from 2, and the exponents are non-increasing. For example, 360 = 2^3 * 3^2 * 5 has exponents 3, 2, 1 using primes 2, 3, 5 consecutively. Highly composite numbers are practical in everyday life: 12 (a dozen), 24 (hours), 60 (minutes, seconds), and 360 (degrees in a circle) are all highly composite, chosen historically because they have many divisors, making division into equal parts easy. Anti-prime is another name for these numbers.
How does the divisor function connect to the Riemann zeta function?
The divisor function has a deep connection to the Riemann zeta function through Dirichlet series. The generating Dirichlet series for sigma_k(n) is sum of sigma_k(n)/n^s = zeta(s) * zeta(s-k), where zeta(s) = sum of 1/n^s is the Riemann zeta function. For k=0, this gives sum of d(n)/n^s = zeta(s)^2, showing that the number-of-divisors function is related to the square of the zeta function. This connection means that properties of the zeta function (including the famous unsolved Riemann Hypothesis) have implications for the average behavior and distribution of divisor function values. The average order of d(n) is ln(n), meaning (1/N) * sum of d(n) for n=1 to N approaches ln(N) as N grows. The average order of sigma_1(n)/n is pi^2/6, which equals zeta(2). These averages encode deep information about the distribution of prime numbers and are central to analytic number theory.
What is the aliquot sum and aliquot sequence?
The aliquot sum s(n) of a positive integer n is the sum of all proper divisors of n, equal to sigma_1(n) - n. The aliquot sequence starting from n is defined by repeatedly applying the aliquot sum: n, s(n), s(s(n)), and so on. Perfect numbers are fixed points of this sequence since s(n) = n. Amicable numbers form 2-cycles: s(a) = b and s(b) = a, like the pair (220, 284). Sociable numbers form longer cycles. The Catalan-Dickson conjecture states that every aliquot sequence either terminates at 0, reaches a fixed point (perfect number), or enters a cycle (amicable or sociable numbers). However, some sequences, like the one starting at 276, have been computed for millions of terms without resolving their fate. The study of aliquot sequences combines computational number theory with deep theoretical questions about the distribution and properties of divisor sums, and remains an active area of research.
How is the divisor function used in modular forms and elliptic curves?
The divisor function plays a starring role in the theory of modular forms, which are complex analytic functions with specific symmetry properties. The Eisenstein series G_k(tau) = sum of sigma_{k-1}(n) * q^n (where q = e^{2*pi*i*tau}) are fundamental examples of modular forms. The normalized Eisenstein series E_4 and E_6 generate the ring of modular forms and appear in the theory of elliptic curves. The Ramanujan tau function, defined through the discriminant modular form Delta = (E_4^3 - E_6^2) / 1728, has Fourier coefficients related to divisor function values. The sum of divisors function sigma_1 appears directly in the q-expansion of the Eisenstein series E_2, which is a quasi-modular form. These connections link the elementary number-theoretic divisor function to some of the deepest structures in modern mathematics, including the proof of Fermats Last Theorem by Andrew Wiles, which fundamentally used the theory of modular forms and elliptic curves.
What are multiplicative functions and why is the divisor function multiplicative?
A multiplicative function f satisfies f(mn) = f(m)*f(n) whenever gcd(m,n) = 1 (m and n are coprime), with f(1) = 1. The divisor function sigma_k is multiplicative because divisors of a product mn (when gcd(m,n)=1) correspond bijectively to pairs (d_m, d_n) where d_m divides m and d_n divides n, with d = d_m * d_n. Since d^k = d_m^k * d_n^k, the sum factors: sigma_k(mn) = sigma_k(m) * sigma_k(n). This is proven rigorously using the Chinese Remainder Theorem. The multiplicative property means computing sigma_k for any n reduces to computing it for prime powers. Other important multiplicative functions include Eulers totient function phi(n), the Mobius function mu(n), and the Liouville function lambda(n). The Dirichlet convolution of two multiplicative functions is also multiplicative, creating a rich algebraic structure. Multiplicative functions form a group under Dirichlet convolution, with the identity being the function that is 1 at n=1 and 0 elsewhere.
What bounds are known for the divisor function?
The divisor function d(n) = sigma_0(n) has well-studied bounds. While d(n) can be as small as 2 (for primes), its maximum growth is characterized by the inequality d(n) < 2^(1.066*ln(n)/ln(ln(n))) for all sufficiently large n, proven using the prime number theorem. The maximum of d(n)/n^epsilon approaches infinity for any epsilon > 0, but d(n)/n^epsilon approaches 0 for any epsilon > 0, showing d(n) grows slower than any positive power of n. The average order of d(n) is ln(n), proven by Dirichlet: sum of d(k) for k=1 to n = n*ln(n) + (2*gamma - 1)*n + O(sqrt(n)), where gamma is the Euler-Mascheroni constant. For sigma_1(n), Robin proved that sigma_1(n) < e^gamma * n * ln(ln(n)) for all n > 5040 is equivalent to the Riemann Hypothesis, creating a remarkable connection between an elementary arithmetic function and the most famous unsolved problem in mathematics. The Gronwall theorem establishes that the maximal order of sigma_1(n)/n is e^gamma * ln(ln(n)).
How do divisor functions appear in partition theory and combinatorics?
Divisor functions have surprising connections to integer partition theory through generating functions and recurrences. The number of partitions p(n) satisfies Eulers recurrence involving sigma_1: n*p(n) = sum of sigma_1(k)*p(n-k) for k=1 to n. This means the partition function can be computed from divisor sums. The generating function for partitions, product of 1/(1-q^k), is related to the Dedekind eta function, which involves divisor sums in its transformation properties. In the theory of modular forms, the Fourier coefficients of various forms involve divisor sum convolutions like sum of sigma_a(k)*sigma_b(n-k). Ramanujans congruences for the partition function (p(5n+4) divisible by 5, p(7n+5) divisible by 7, p(11n+6) divisible by 11) are proved using properties of Eisenstein series that encode divisor functions. In combinatorics, the number of representations of n as a sum of k squares is expressed using divisor functions, connecting to the theory of quadratic forms and lattice point counting.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎBessel Function Calculator
Calculate bessel function with inputs, formulas, and instant results.
๐งฎComposite Function Calculator
Calculate composite function with inputs, formulas, and instant results.
๐งฎError Function Calculator
Calculate error function with inputs, formulas, and instant results.
๐งฎFunction Domain Calculator
Calculate function domain with inputs, formulas, and instant results.
๐งฎFunction Range Calculator
Calculate function range with inputs, formulas, and instant results.
๐งฎGamma Function Calculator
Calculate gamma function with inputs, formulas, and instant results.
๐งฎInverse Function Calculator
Calculate inverse function with inputs, formulas, and instant results.
๐งฎPiecewise Function Evaluator
Calculate piecewise function evaluator with inputs, formulas, and instant results.