The Divisor Functions
The most natural questions to ask about a number's divisors: how many are there, and what
do they add up to? Both answers are
multiplicative functions,
so both fall straight out of the prime factorisation.
Counting divisors: \tau(n)
Write \tau(n) (also d(n)) for the number of
positive divisors. A divisor of n = p_1^{a_1}\cdots p_k^{a_k} is built by
choosing each prime's exponent independently, from 0 up to
a_i β that's a_i + 1 choices each:
\tau(n) = (a_1 + 1)(a_2 + 1)\cdots(a_k + 1).
So \tau(12) = \tau(2^2\cdot 3) = (2+1)(1+1) = 6 β and indeed
12 has divisors 1,2,3,4,6,12.
Summing divisors: \sigma(n)
Write \sigma(n) for the sum of the divisors. On a single prime power the
divisors form a geometric series, giving a tidy closed form:
\sigma(p^{a}) = 1 + p + p^2 + \cdots + p^{a} = \frac{p^{a+1} - 1}{p - 1},
and multiplicativity stitches the prime powers together:
\sigma(12) = \sigma(2^2)\,\sigma(3) = (1+2+4)(1+3) = 7 \cdot 4 = 28.
Reading a number's character
These functions reveal a number's "shape". A prime has
\tau(p) = 2 (only 1 and itself); a perfect
square has an odd \tau (its square root is unpaired). And
comparing \sigma(n) against n sorts numbers
into deficient, abundant, and the rare
perfect
β the subject of the next page.