Module 3.6 · Number Theory
Divisor functions
How many divisors does have? What is the sum of the divisors of that are multiples of ? What is the smallest number with divisors? These questions all come down to the prime factorization and one structural fact: divisor functions are multiplicative, so you can work one prime at a time.
Counting and adding divisors
Every divisor of has the form with , and different exponent choices give different divisors (unique factorization). That gives both formulas below.
Divisor count and divisor sum
For :
Why the sum formula works. Expand the product . Each term of the expansion picks one power from each factor and multiplies them, which is exactly one divisor. Every divisor appears exactly once. So the expansion is the sum of all divisors.
The same "expand a product" idea lets you sum any restricted set of divisors. For divisors that are multiples of , use in the -factor instead of . For odd divisors, drop the -factor entirely.
Multiplicativity
Definition
Multiplicative function
A function on positive integers is multiplicative if whenever .
, and are all multiplicative: when , each divisor of splits uniquely as (divisor of ) times (divisor of ). So to compute one of them, compute it on each prime power and multiply.
Product of divisors
Pair each divisor of with . Each pair multiplies to , so
(When is a perfect square, pairs with itself and the formula still holds.)
Parity facts
- is odd exactly when is a perfect square: divisors pair up as except .
- is odd exactly when is a square or twice a square. For odd , has odd terms, so it's odd iff is even. The factor for is always odd.
Perfect and abundant numbers
is perfect if and abundant if . The ratio is also multiplicative, and for a prime power it is less than . This is the tool for abundance questions.
Euclid showed that if is prime then is perfect: . Euler proved every even perfect number has this form:
Worked example: Counting divisors
How many positive divisors does have?
with prime, so and .
Worked example: Smallest number with a given divisor count
Find the smallest positive integer with exactly divisors.
Write as a product of factors : , , , . Give the largest exponents to the smallest primes:
, , , .
The smallest is .
Worked example: Counting lcm pairs
How many ordered pairs of positive integers have ?
Work one prime at a time. For : exponents with and . There are such pairs. For : . In general a prime power contributes . The answer is .
Worked example: Divisors of a square
For , how many divisors of are less than ?
has divisors. They pair up as , one smaller than and one larger, except . So are less than .
Common mistake
To minimize a number with a given divisor count, don't automatically use the most primes. Compare every factorization of the count, as in the example: beats here, but for , beats .
Practice
How many positive divisors does have?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Find the sum of all positive divisors of that are multiples of .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Find the smallest positive integer with exactly positive divisors.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
For how many integers with is the product of all positive divisors of equal to ?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many positive divisors of are perfect squares or perfect cubes (or both)?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many ordered pairs of positive integers satisfy ?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
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.
Find the smallest odd positive integer with .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Real contest practice
- 1995 AIME, Problem 6: divisors of that are less than but do not divide .
- 2005 AIME I, Problem 12: the parity of running sums of , using " is odd iff is a square."