Module 3.1 · Number Theory
Divisors and prime factorization
On the AMC 10 and 12, "how many divisors" is only the warm-up. The real questions ask for the sum of the divisors, their product, divisors with a special property, or pairs of numbers with a given GCD and LCM. Every one of these is answered the same way: write the number as a product of prime powers and think about each prime separately.
Divisors are exponent choices
If , then every divisor of looks like with , and different exponent choices give different divisors. So a divisor is nothing more than a list of independent choices, one per prime. That single fact gives you all of the formulas below.
- Counting. Prime has exponent choices, so .
- Restricted counting. To count divisors with a property (perfect square, multiple of , odd), restrict the exponent choices for each prime and multiply. A square divisor needs every exponent even; an odd divisor needs the exponent of to be .
The sum of the divisors
Expand the product
Each term of the expansion picks one power of and one power of and multiplies them, so the expansion lists every divisor of exactly once. The sum of the divisors of is .
Divisor formulas
For :
- Number of divisors: .
- Sum of divisors: , and each factor equals .
- Product of divisors: .
The product of the divisors
Divisors come in pairs and whose product is . There are divisors, so there are pairs and the product of all the divisors is . This works even when is a perfect square: the middle divisor pairs with itself and contributes , which is exactly what the formula gives.
GCD and LCM, one prime at a time
For each prime, uses the smaller exponent and uses the larger one. So if you know the LCM (or both the GCD and LCM), you can count pairs prime by prime:
- If has , the exponents of in and are at most and at least one equals : that's ordered choices.
- If has and has with , one number gets and the other gets : ordered choices. If there is only .
Worked example: A sum of divisors
What is the sum of the positive divisors of ?
, so
Worked example: Pairs with a given LCM
How many ordered pairs of positive integers have ?
. For the prime , the exponents in and lie in with at least one equal to : choices. For the prime : choices. The primes are independent, so there are ordered pairs.
Worked example: Divisors of the square
Let . How many positive divisors of are less than but do not divide ?
has divisors. Apart from itself, they pair up as and with exactly one of each pair below , so divisors of are less than .
Every divisor of also divides . The number has divisors, and of them are less than . So the answer is .
Worked example: Working backward from the product
The product of all the positive divisors of a positive integer is . Find .
The product is , so uses only the primes and : say and . Comparing exponents, and , so . Then becomes , and works: . So and .
Common mistake
The divisor-count formula uses exponent plus one, and it needs the full prime factorization. A common slip is factoring as and multiplying divisor counts: , but . You can only multiply (or ) across factors that share no prime.
Tip
is odd exactly when every odd prime appears to an even power: then each factor for an odd has an odd number of odd terms. The factor for is always odd. So is odd exactly when is a perfect square or twice a perfect square.
Practice
How many positive divisors of are perfect squares?
How many positive divisors of are multiples of ?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
What is the sum of all the positive odd divisors of ?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
What is the smallest positive integer that has exactly positive divisors?
How many ordered pairs of positive integers satisfy and ?
A positive integer has only and as prime factors. has exactly positive divisors and has exactly . How many positive divisors does have?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
The product of all the positive divisors of is , and for positive integers and . What is the smallest possible value of ?
For how many positive integers is the sum of the positive divisors of odd?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Real contest practice
- 2008 AMC 12B, Problem 23: the product of the divisors of , disguised as a sum of logarithms.
- 2019 AMC 10B, Problem 19: products of two distinct divisors, counted through exponents.