Mathwords logoMathwords

Divisor Function — Definition, Formula & Examples

The divisor function σk(n)\sigma_k(n) adds up the kk-th powers of every positive divisor of nn. Two especially common cases are σ0(n)\sigma_0(n), which counts the number of divisors, and σ1(n)\sigma_1(n), which gives their sum.

For a positive integer nn and a non-negative integer (or more generally, complex number) kk, the divisor function is defined as σk(n)=dndk\sigma_k(n) = \sum_{d \mid n} d^k, where the sum ranges over all positive divisors dd of nn. The special case σ0(n)\sigma_0(n) is often denoted d(n)d(n) or τ(n)\tau(n), and σ1(n)\sigma_1(n) is often written simply as σ(n)\sigma(n).

Key Formula

σk(n)=dndk\sigma_k(n) = \sum_{d \mid n} d^{\,k}
Where:
  • nn = A positive integer whose divisors are being summed
  • kk = The exponent applied to each divisor (commonly 0 or 1)
  • dnd \mid n = d ranges over all positive divisors of n

How It Works

To compute σk(n)\sigma_k(n), first list every positive integer that divides nn evenly. Then raise each divisor to the kk-th power and add the results. When nn has a prime factorization n=p1a1p2a2prarn = p_1^{a_1} p_2^{a_2} \cdots p_r^{a_r}, the divisor function is multiplicative, meaning σk(n)=i=1rσk(piai)\sigma_k(n) = \prod_{i=1}^{r} \sigma_k(p_i^{a_i}). For a prime power, there is a closed form: σk(pa)=1+pk+p2k++pak\sigma_k(p^a) = 1 + p^k + p^{2k} + \cdots + p^{ak}.

Worked Example

Problem: Compute σ₀(12), σ₁(12), and σ₂(12).
List divisors: The positive divisors of 12 are 1, 2, 3, 4, 6, and 12.
Compute σ₀(12): Raise each divisor to the 0th power (each equals 1) and sum.
σ0(12)=1+1+1+1+1+1=6\sigma_0(12) = 1+1+1+1+1+1 = 6
Compute σ₁(12): Sum the divisors themselves.
σ1(12)=1+2+3+4+6+12=28\sigma_1(12) = 1+2+3+4+6+12 = 28
Compute σ₂(12): Sum the squares of each divisor.
σ2(12)=1+4+9+16+36+144=210\sigma_2(12) = 1+4+9+16+36+144 = 210
Answer: σ₀(12) = 6, σ₁(12) = 28, σ₂(12) = 210.

Visualization

Why It Matters

The divisor function appears throughout analytic and algebraic number theory. Classifying perfect numbers relies on σ1(n)=2n\sigma_1(n) = 2n, a condition tied to open problems like the existence of odd perfect numbers. It also arises in the theory of modular forms, where identities involving σk\sigma_k connect to partition counting and the Ramanujan tau function.

Common Mistakes

Mistake: Confusing σ₀(n) (number of divisors) with σ₁(n) (sum of divisors) because both are called 'the divisor function.'
Correction: Always check the subscript k. σ₀ counts divisors, σ₁ sums them, and σ_k for higher k sums their k-th powers. When no subscript is written, σ(n) typically means σ₁(n).