Divisor Function Calculator
Solve divisor function problems step-by-step with our free calculator. See formulas, worked examples, and clear explanations.
Calculator
Adjust values & calculateAll Divisors of 60
Divisor Pairs (d * 60/d = 60)
Prime Factorization
Formula
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).
Last reviewed: December 2025
Worked Examples
Example 1: Divisor Function Values for n = 60
Example 2: Checking if 28 is a Perfect Number
Background & Theory
The Divisor Function Calculator applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.
History
The history behind the Divisor Function Calculator traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.
Frequently Asked Questions
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}\nsigma_0(60) = 12 (count of divisors)\nsigma_1(60) = 1+2+3+4+5+6+10+12+15+20+30+60 = 168\nsigma_2(60) = 1+4+9+16+25+36+100+144+225+400+900+3600 = 5460\n\nFrom factorization:\nsigma_0 = (2+1)(1+1)(1+1) = 12\nsigma_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\nDivisors: {1, 2, 4, 7, 14, 28}\nProper divisors: {1, 2, 4, 7, 14}\nAliquot sum = 1 + 2 + 4 + 7 + 14 = 28\n\nsigma_1(28) = 1+2+4+7+14+28 = 56 = 2*28\n\n28 = 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 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.
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.
References
Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy