each term in the expansion is p1e1p2e2⋯pkek with 0≤ei≤ai — exactly the divisors of n. Summing all terms gives σ(n). ■
Example.σ(360) where 360=23×32×5.
σ(360)=(1+2+4+8)(1+3+9)(1+5)=15×13×6=1170
Multiplicativity
Both τ and σ are multiplicative: if gcd(m,n)=1, then:
τ(mn)=τ(m)τ(n)σ(mn)=σ(m)σ(n)
Why. The prime factorizations of m and n share no primes (since gcd(m,n)=1). So the product formula for τ(mn) splits cleanly into the product for τ(m) times the product for τ(n).
This multiplicativity is why the formulas factor over primes — each prime contributes independently.
Common mistake.τ(mn)=τ(m)τ(n) requires gcd(m,n)=1. Without it: τ(4)=3 but τ(2)τ(2)=4. They differ.
Perfect numbers
A positive integer n is perfect if σ(n)=2n — it equals the sum of all its proper divisors (divisors excluding itself).
Examples:6=1+2+3 and 28=1+2+4+7+14. Both perfect.
Euler's theorem on even perfect numbers.n is an even perfect number ⟺n=2p−1(2p−1) where 2p−1 is prime (a Mersenne prime).
Proof sketch. Write n=2km with m odd. Then σ(n)=σ(2k)σ(m)=(2k+1−1)σ(m). Setting σ(n)=2n=2k+1m and solving forces m=2k+1−1 (a prime) and k=p−1.
Whether any odd perfect numbers exist is an open problem.
Worked problems
Problem 1. Find the number of divisors of 1010.
1010=210×510.
τ(1010)=(10+1)(10+1)=121.
Problem 2. For how many values of n≤100 is τ(n) odd?
τ(n) is odd ⟺n is a perfect square. Perfect squares ≤100: 1,4,9,…,100. That is 10 values.
Problem 3. Find all n such that τ(n)=2.
τ(n)=2⟺n has exactly 2 divisors ⟺n is prime. ■
Problem 4. Find σ(2k) and verify it equals 2k+1−1.
σ(2k)=1+2+4+⋯+2k=2k+1−1. (Geometric series.) ✓
Note: σ(2k) is always odd. So 2k is never perfect — a perfect number requires σ(n)=2n which is even.
Problem 5. If n=paqb with p,q distinct primes, find τ(n2) in terms of τ(n).
n2=p2aq2b.
τ(n2)=(2a+1)(2b+1).
τ(n)=(a+1)(b+1).
No clean relationship in general. But if a=b: τ(n)=(a+1)2 and τ(n2)=(2a+1)2.
Problem 6. Find the sum of all divisors of 496. Is 496 perfect?
496=16×31=24×31.
σ(496)=(1+2+4+8+16)(1+31)=31×32=992=2×496.
Yes, 496 is perfect. (And 31=25−1 is a Mersenne prime, confirming Euler's theorem.)
Problem 7. How many ordered pairs (a,b) of positive integers satisfy lcm(a,b)=n?
For n=p1e1⋯pkek: each prime pi contributes independently. If a has piαi and b has piβi, then max(αi,βi)=ei.
Pairs (αi,βi) with max=ei: total pairs with both ≤ei is (ei+1)2; subtract pairs where both ≤ei−1, giving (ei+1)2−ei2=2ei+1.
Total ordered pairs: ∏i=1k(2ei+1)=τ(n2).
The pattern connecting everything
τ(n)=∑d∣n1σ(n)=∑d∣ndσk(n)=∑d∣ndk
These are all special cases of Dirichlet series — sums over divisors. The deeper theory of how they multiply and interact is the Dirichlet convolution, which lives in Dirichlet's Divisor Problem.