Learn / Library / Brainteasers
A rare toggle count
lockers numbered to start closed. For each from to , person toggles every locker whose number is a multiple of . How many lockers are toggled exactly times in total?
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Which numbers have exactly divisors?
Solution
- Locker is toggled once per divisor of , so we need numbers with exactly divisors.
- An odd number of divisors means is a square, and divisors means for a prime , with divisors , and .
- With the primes are , , and , giving , , and .
- So the number of such lockers is .
Answer: