Exercise 752Number theory › Divisibility and gcdL1Added 2 Nov 2026
When is the number of divisors odd?
#divisors#perfect squares#counting
Statement
Show that a positive integer has an odd number of positive divisors if and only if is a perfect square.
Hint
Pair each divisor with . The pairing is perfect except when .
Show solutionHide solution
Solution
Pairing. For each divisor of , is also a divisor. The map is an involution. Fixed points satisfy , i.e. .
Conclusion. If is not a square, all divisors pair up, so the number of divisors is even. If , all divisors pair up except , so the number of divisors is odd.