The Divisor and Sigma Functions
How many ways can 360 be divided evenly? What happens when you add up all its divisors? These two innocent-looking counting questions lead to two of the oldest functions in number theory. They are the divisor function and the sum-of-divisors function . They arose historically from the study of perfect numbers. Perfect numbers equal the sum of their proper divisors. They also arose from questions about the factorization structure of integers. But their reach today extends into analytic number theory, modular forms, and cryptography. The reason these functions are tractable, rather than a chaotic mess depending unpredictably on , is that they are multiplicative. Knowing their values on prime powers determines their values everywhere. This is not an accident. It is a direct consequence of the definitions being built from divisor sums combined with the Fundamental Theorem of Arithmetic. Once multiplicativity is established, computing or for any reduces to two steps. First, factor . Then apply a simple closed formula on each prime power factor. The big picture is that and are the prototypical examples in the theory of Multiplicative Functions. This is the toolbox that turns a hard combinatorial question about a specific integer into an easy local computation. That computation happens at each prime dividing . This same pattern recurs throughout number theory. Define a function via a divisor sum, prove multiplicativity, then compute on prime powers. This applies to Euler's totient function, the Möbius function, and beyond. This article gives the rigorous definitions of and . It proves from first principles that both are multiplicative. It derives the explicit prime-power and general formulas. It also works through fully computed examples. It closes by connecting these functions to the analytic machinery that turns them into powerful tools. This machinery includes Dirichlet series and average orders. Together they help study the distribution of integers.
- counts the positive divisors of ; sums the -th powers of the positive divisors of .
- Both are defined via sums over divisors, so their behavior is governed entirely by the prime factorization of .
- Multiplicativity means whenever ; both and have this property.
- On a prime power , the formulas are explicit: and (with ).
- These functions feed directly into perfect number theory (), Dirichlet series (, ), and average-order estimates.
- Key idea: a divisor sum factors along the Fundamental Theorem of Arithmetic, so multiplicative functions reduce global questions to local, prime-by-prime computations.
Where this lives today
The divisor and sigma functions are not museum pieces; they are working tools across mathematics and its applications. In analytic number theory, and are the model examples for the average order problem: one studies via Dirichlet's hyperbola method to get , and , both foreshadowing the general machinery of Average Order of Arithmetic Functions. Their multiplicativity is precisely what makes the associated Dirichlet series factor into Euler products: and , connecting directly to Dirichlet Series and Euler Products and to the analytic continuation properties of the Riemann zeta function. In the theory of perfect and amicable numbers, is the defining object: is perfect iff , and the search for odd perfect numbers (still open) is a search for solutions to this equation with no known even-style structural theorem. In cryptography, the Euler totient function (a close cousin, also multiplicative and built from prime-power formulas) underlies RSA key generation, and the same prime-factorization-driven multiplicative-function toolkit used here for is the template for computing efficiently once 's factorization is known. In combinatorics and algebra, counts the number of subgroups of a cyclic group of order , and appears in the theory of modular forms as (up to normalization) the Fourier coefficients of Eisenstein series of weight , linking elementary divisor sums to the deep machinery of modular forms and -functions.
Ask the tutor: How does Dirichlet's hyperbola method use the divisor function's multiplicativity to derive its average order ?
Let be a positive integer. The divisor function (also written ) is the number of positive divisors of :
For a real or complex number , the sigma function is the sum of the -th powers of the positive divisors of :
Two special cases recur constantly:
- , the divisor-counting function.
- , the ordinary sum-of-divisors function, simply written .
A positive integer is called perfect if , equivalently if equals the sum of its proper (i.e. smaller-than-) divisors. An arithmetic function is multiplicative if and for all coprime positive integers (i.e. ). It is completely multiplicative if holds for all pairs , without the coprimality restriction. (See Multiplicative Functions.)
Intuition
Think of the divisors of as sitting on a grid indexed by the exponents in 's prime factorization. If , then every divisor of is obtained by independently choosing an exponent for each prime and forming . This is exactly a Cartesian product of choices, one independent choice per prime. Counting the divisors is then counting lattice points in a box , whose size is the product — multiplicativity made visible as literal geometric independence of the prime directions. The same "independent choice per prime" picture explains why factors too: summing over all divisors is summing over all such lattice points, and because factors along the coordinates, the sum over the box factors into a product of sums over each coordinate axis — one geometric series per prime.
Theorem statements and proofs
Let be any multiplicative function, and define
Then is also multiplicative.
We use the divisor-pairing technique for coprime moduli, a standard tool built directly on the definition of multiplicativity and the properties of . First, , since is multiplicative and the only divisor of is itself. Now let be positive integers with . We must show .
Step 1: divisors of correspond bijectively to pairs of divisors. Define a map
We claim is a bijection. is well-defined: if and , then trivially, since and give . is injective: suppose with and . Since , also (as and , and any common factor of would be a common factor of ). From we get ; since , Euclid's lemma gives . By the symmetric argument , so (both positive). Then follows by cancellation. Hence . is surjective: let . Set and . Clearly and . We show . Since , we have (a common divisor of divides both and , hence divides ). Also : this requires a short argument. Write since . Because , one can show — this is a standard consequence of unique factorization: for each prime , and at most one of is nonzero (as ), so once one checks both sides agree in the two cases or . Taking the product over all primes gives . Since , , so , confirming surjectivity. Thus is a bijection between divisors of and pairs with , .
Step 2: use multiplicativity of and coprimality of the parts. For any divisor pair from Step 1, and with forces (shown above). Since is multiplicative,
Step 3: factor the double sum. Using the bijection to re-index the sum defining :
The last step is legitimate distributivity of finite sums (factoring a product of sums into a double sum, and back), valid since all sums here are finite. This proves for all coprime , and , so is multiplicative.
∎The functions and , for any fixed , are multiplicative.
Apply the theorem with for all (which is trivially completely multiplicative, since for all inputs, and in particular multiplicative) to get that is multiplicative. Apply the theorem with . This is completely multiplicative: for all (no coprimality needed), and . In particular is multiplicative, so the theorem applies and is multiplicative.
∎Let be prime and an integer. Then:
and for ,
(For this reduces correctly to , matching the boundary formula by continuity of the geometric-sum argument, or simply by direct count.) Consequently, if is the prime factorization of (with distinct primes and ), then
By convention (empty product).
Prime power case. The positive divisors of are exactly . This is because any divisor of must, by unique factorization, be of the form for some : indeed if a prime divided then would divide , contradicting unique factorization (the only prime factor of is ); and the exponent of in cannot exceed since . Conversely every with visibly divides . This gives exactly divisors (namely ), so
Summing -th powers over these divisors,
a finite geometric series with ratio and terms. Since , we have whenever (as for real), so the standard finite geometric series formula applies:
General . Write with the distinct primes; this factorization exists and is unique by the Fundamental Theorem of Arithmetic. We prove the product formula by induction on . Base case : , and the prime-power formulas above give exactly and , matching the claimed product of one factor. Inductive step: suppose the formula holds for integers with distinct prime factors (). Let where . Since the are distinct primes, (no prime divides both, again by unique factorization). By the Corollary above (multiplicativity of and ),
By the induction hypothesis applied to (which has exactly distinct prime factors ),
Multiplying by the prime-power formula for gives exactly
completing the induction.
∎Worked examples
Example 1: . Factor . Check: . ✓. Divisor count. By the theorem,
Direct sanity check: the 24 divisors of 360 are — indeed 24 numbers. Sum of divisors . Using the geometric-series formula on each prime power:
So
Since , 360 is not perfect, but it is abundant (), since . Sum of squares of divisors . Now :
So
(Computed as , then .)
Example 2: verifying multiplicativity directly on coprime , (so again, but now checked without the prime-power shortcut, confirming the factoring theorem itself). Take and , which are coprime since (8 is a power of 2, 45 has no factor of 2). Divisors of : , so and . Divisors of : , so and . The theorem predicts
which match Example 1's values ( and ) exactly. This double-checks both the multiplicativity theorem and the prime-power computation against an independent route through a different coprime factorization of the same , confirming the whole machine is self-consistent.
The theorem requires . Drop this hypothesis and multiplicativity of genuinely fails — is not completely multiplicative. Take (so ). Then
but
Since , the identity fails when share a common factor. The reason traces directly to the proof: the bijection between pairs of divisors of and divisors of is no longer injective once . For : divisors of are , divisors of are , giving four pairs , but their products are — the value is hit twice, so is not injective, and distinct divisors of (namely , only three of them) do not correspond bijectively to the four pairs. The same failure of injectivity underlies the failure of to be completely multiplicative in general. This is exactly why the definition of multiplicative function restricts to coprime arguments: it is the coprimality that makes the divisor-pairing bijection work.
Scope, edge cases & common traps
| Situation | What holds | What can fail |
|---|---|---|
| , | — | |
| Prime factorization formula still fully determines from scratch | generally false (see counterexample) | |
| by convention (empty divisor sum beyond the single divisor 1) | Forgetting as base case breaks induction | |
| ; geometric series formula degenerates (ratio ), must count directly | Plugging into gives , undefined — must use the direct count instead | |
| Negative or complex | Formulas hold verbatim (, geometric sum still valid since for real ) | None, as long as |
The mathematician behind it
Origins · 1 minLeonhard Euler and how this was discovered
Euler was the first to systematically study in connection with perfect numbers, proving the converse direction of the Euclid–Euler theorem: every even perfect number has the form where is a Mersenne prime. His techniques for manipulating divisor sums and his introduction of what we would now call Euler products laid the groundwork for treating and as coefficients of the analytic objects — Dirichlet series — that later number theorists would use to study their average behavior.
Is ever equal to for ?
Generically no, since grows with while grows extremely slowly (roughly like ), but they can coincide for small special . For example gives for every . For , and , already unequal. Because for essentially all once , exact coincidences beyond are rare accidents rather than a pattern, and there is no clean characterization of when they occur.
Why is specifically, and not something else?
By definition . Setting gives , since any positive real number raised to the power is . That sum is precisely the count of divisors, which is the definition of . So is not a coincidence but a direct algebraic consequence of the general definition, unifying divisor-counting and divisor-summing as the and instances of one family.
Does the multiplicativity theorem apply to functions other than and ?
Yes — the theorem is stated for any multiplicative , and are just the two most common instances (from and ). The same mechanism proves that Euler's totient function , viewed via , is consistent with multiplicativity, and it underlies the multiplicativity of the Möbius function's summatory identities. This is the general content of the theory of Multiplicative Functions: divisor sums of multiplicative functions are multiplicative.
How do you compute or efficiently for a large ?
Factor into primes, then apply the closed-form product formulas. The bottleneck is factoring itself, which for very large is computationally hard (this hardness is exactly what RSA cryptography relies on). Once the factorization is known, computing and takes only a handful of arithmetic operations, since each factor is a simple closed-form expression rather than a sum over potentially huge numbers of divisors.
Are and ever negative or non-integer?
For positive integer and integer , and are always positive integers, since they are finite sums of positive integer powers of positive integer divisors. For negative or non-integer , can be a positive real number that is not an integer — for instance is generally a fraction. Interestingly exactly, since divisors pair up as , giving a clean identity relating to .
What's the connection between and perfect numbers?
By definition is perfect exactly when , since sums all divisors including itself, so is the sum of proper divisors; the perfect number condition " equals the sum of its proper divisors" becomes , i.e. . The Euclid–Euler theorem characterizes all even perfect numbers as exactly the integers for Mersenne primes ; whether any odd perfect number exists remains a famous open problem in number theory.
Why does multiplicativity reduce everything to prime powers?
Because every factors uniquely as a product of prime powers with pairwise-coprime prime bases (Fundamental Theorem of Arithmetic), and multiplicativity says applied to such a product equals the product of applied to each prime-power factor. So knowing on every prime power completely determines for every , via one multiplication per distinct prime factor. This is what converts an infinite family of individually mysterious values into a finite, checkable rule on prime powers.