Example 3 (n a positive integer):
- P: If n is a perfect square, then it has an odd number of factors.
- Q: If n has an odd number of factors, then it is a perfect square.
Factor-partner pairs. Each factor has a partner with product n: for 12 the pairs are (1, 12), (2, 6), (3, 4), so 12 has 6 factors. For 25 the pairs are (1, 25) and (5, 5): 5 is its own partner, so 25 has 3 factors.
Proving Q. n has an odd number of factors → there must be a pair with the same number repeated, (f, f) (otherwise every factor pairs off and the count is even) → n = f × f is a perfect square.
This proves Q only, not P.
Proving P. If n = f × f, there is a repeating pair (f, f). Could there be two repeating pairs, (f, f) and (g, g)? No: f × f = g × g means f = g. So exactly one factor is unpaired and the count is odd. P is true too.
So 'n is a perfect square' and 'n has an odd number of factors' imply each other.
Similar: 'if n is the square of a prime p, it has exactly 3 factors' (1, p, p²): true. Converse, 'exactly 3 factors → square of a prime': also true.
Tap the diagram to enlarge it
- Odd factors ⇔ square
- 25: 1, 5, 25
- Prime square: 3 factors