Exercise 620Number theory › Divisibility and gcdOlympiadAdded 4 Nov 2026
Counting divisors and the hundred lockers
#divisor function#perfect squares#pairing
Statement
Let be the number of positive divisors of .
- Prove that is odd if and only if is a perfect square.
- There are lockers, all closed. For , student number changes the state (open/closed) of every -th locker. Which lockers are open at the end?
- What is the smallest positive integer with exactly divisors?
Hint
Pair each divisor with .
Show solutionHide solution
Solution
1. The map is an involution on the set of divisors of . Its fixed points satisfy . So divisors come in pairs with , except when is a square, where is unpaired. Hence is odd iff is a square.
2. Locker is touched once by every student dividing , i.e. times. It ends open iff is odd iff is a perfect square. The open lockers are (ten lockers).
3. If then . To get divisors, the exponents are , , or . Minimal numbers: , , , . The smallest is .
Lesson. Pair divisors ; and recall to optimise over factorisation types.