Module 3.4 · Number Theory
Counting divisors
"How many positive divisors does have?" Listing them one by one is slow and easy to botch. With the prime factorization in hand, you can count them in one line and answer related questions too: how many are odd, how many are perfect squares, and what they add up to.
The divisor-counting formula
Take . Any divisor of can use only the primes and , and no more of each than has. So every divisor looks like There are choices for and for , and each pair gives a different divisor (by unique factorization). So has divisors.
Number of divisors
If , then the number of positive divisors of is
Common mistake
The "" is there because an exponent of is allowed. Students who multiply the exponents themselves ( for ) get the wrong answer. Also make sure you've factored all the way into primes: writing and computing is wrong.
Worked example: Count them all
How many positive divisors does have?
, so it has divisors.
Divisors with a condition
Restrict the choice of exponents.
- Odd divisors: force the exponent of to be .
- Even divisors: total minus odd, or force the exponent of to be at least .
- Multiples of : force each exponent to be at least what needs.
- Perfect-square divisors: allow only even exponents.
Worked example: Even divisors
How many positive divisors of are even?
Odd divisors of use only: of them. So there are even divisors. (Or directly: the exponent of is one of , giving .)
Sum of divisors
Multiply out . Each term of the expansion is one choice from each bracket, like . So you get every divisor of exactly once, and the product is their sum.
Worked example: Sum of divisors
What is the sum of the positive divisors of ?
, so the sum is .
Odd numbers of divisors
Divisors come in pairs: pairs with . For : , , , , and then , which pairs with itself. A number has an odd number of divisors exactly when it is a perfect square. This matches the formula: all even means every factor is odd.
Tip
Numbers with exactly divisors are squares of primes (), since forces . In general, factor the target count to see what shapes can take: exactly divisors means or .
Practice
How many positive divisors does have?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many positive divisors of are odd?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
What is the sum of all positive divisors of ?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many integers from to have an odd number of positive divisors?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many positive integers less than have exactly three positive divisors?
What is the smallest positive integer with exactly positive divisors?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many positive divisors of are perfect squares?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many positive divisors of are multiples of ?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Real contest practice
- 2018 AMC 8, Problem 18: count the divisors of a five-digit number.
- 2020 AMC 8, Problem 17: which divisors of have more than a few divisors of their own.