Maths WorkshopMaths problems with full solutions
Exercise 927Number theory › Divisibility and gcdL1Added 3 Nov 2026

Perfect squares and divisors

#perfect squares#divisors#parity

Statement

Show that nn is a perfect square iff τ(n)\tau(n) is odd.

Hint

Pair divisors dd with n/dn/d; unpaired iff d=n/dd=n/d.

Show solutionHide solution

Solution

Pairing. For each divisor dd of nn, n/dn/d is also a divisor. Fixed points: d=n/dd=n/d, i.e. d2=nd^2=n.

Count. If nn is not a square, all divisors pair up, τ(n)\tau(n) even. If n=k2n=k^2, all divisors except kk pair up, τ(n)\tau(n) odd.

Conclusion. τ(n)\tau(n) is odd iff nn is a perfect square.