Lesson 8 of 8 · Number Theory
Counting Divisors & Sums of Divisors
You already know the basic divisor-count and divisor-sum formulas from the first lesson in this domain — this lesson goes further: counting divisors that satisfy an extra condition (odd, even, a perfect square, a multiple of something), and using σ(n) to classify numbers as perfect, abundant, or deficient.
Mark your status for this lesson:
Learning objectives
- Count odd or even divisors of n by splitting off n's power of 2 first.
- Count divisors of n satisfying a structural condition, like being a perfect square or a multiple of k.
- Classify a number as perfect, abundant, or deficient using σ(n) versus 2n.
- Recognize amicable pairs and compute proper-divisor sums.
The core idea
Every divisor-counting question with an extra condition reduces to the same move: translate the condition into a constraint on the exponents in the prime factorization, then count how many exponent combinations satisfy it. "Odd divisor" means the exponent of 2 is fixed at 0. "Perfect square divisor" means every exponent must be even. "Multiple of k" means dividing out k first and counting divisors of what's left.
Odd vs. even divisors
If n = 2^e × m with m odd, the odd divisors of n are exactly the divisors of m, and the even divisors are everything else — total divisors minus odd divisors.
Classifying by σ(n)
σ(n) = 2n → perfect; σ(n) > 2n → abundant; σ(n) < 2n → deficient
Perfect numbers are rare (6, 28, 496, 8128, ...) and every known one is even. Most small numbers are deficient; abundant numbers start appearing at 12.
Amicable pairs
Two numbers a and b are amicable if the sum of a's proper divisors (divisors excluding itself) equals b, and vice versa. The smallest pair is 220 and 284, known since antiquity.
Worked example 1 — Odd divisors
Problem
How many odd divisors does 180 have?
Key insight
Strip out the power of 2 — the odd divisors are exactly the divisors of what remains.
Solution
180 = 2² × 3² × 5. The odd part is 3² × 5 = 45, which has (2+1)(1+1) = 6 divisors.
Takeaway
Never count odd divisors by listing — strip the 2s and apply the ordinary formula to what's left.
Worked example 2 — Divisors that are perfect squares
Problem
How many divisors of 144 are perfect squares?
Key insight
A divisor is a perfect square exactly when every exponent in its factorization is even.
Solution
144 = 2⁴ × 3². A divisor 2ᵃ3ᵇ is a perfect square when a ∈ {0,2,4} and b ∈ {0,2} — 3 × 2 = 6 combinations.
Takeaway
Count the even choices for each exponent independently, then multiply — the same structure as the ordinary divisor-count formula, restricted to even exponents.
Worked example 3 — Classifying a number
Problem
Is 18 perfect, abundant, or deficient?
Key insight
Compute σ(18) and compare it to 2(18) = 36.
Solution
18 = 2 × 3². σ(18) = (1+2)(1+3+9) = 39. Since 39 > 36, 18 is abundant.
Takeaway
This classification is just the ordinary σ(n) formula, followed by one comparison — no new computation technique needed.
Worked example 4 — Divisors that are multiples of k
Problem
How many divisors of 360 are multiples of 6?
Key insight
Every divisor of 360 that's a multiple of 6 corresponds exactly to a divisor of 360/6.
Solution
360/6 = 60, and 60 = 2² × 3 × 5 has (2+1)(1+1)(1+1) = 12 divisors.
Takeaway
Divide first, then count — this bijection (each divisor of n/k, multiplied by k, gives a distinct multiple-of-k divisor of n) is the key move for this whole category of problem.
Strategy notes
Translate the condition into an exponent constraint first
Every variant in this lesson — odd, even, perfect square, multiple of k — reduces to a constraint on the exponents in the prime factorization. Identify that constraint before trying to count anything.
"Multiples of k" divisors: divide first, then count
To count divisors of n that are multiples of k, divide n by k and count the divisors of the result — don't try to filter the full divisor list of n directly.
Common mistakes
Forgetting exponent 0 counts as "even"
When counting perfect-square divisors, an exponent of 0 is even and must be included as a valid choice — don't accidentally start counting from 2.
Confusing "proper divisors" with "all divisors"
Proper divisors exclude the number itself. σ(n) includes n itself — for amicable-pair and perfect-number questions, always check whether the problem wants σ(n) or σ(n) − n.
Assuming k divides n before dividing
The "divide by k, then count" trick for multiple-of-k divisors only works when k actually divides n. If it doesn't, there are zero such divisors — check this first.
Practice
20 questions across four difficulty tiers, each with a single numeric answer. Up to three tries per question before the solution is shown.