Person 1 opens every locker, Person 2 toggles every 2nd, Person 3 every 3rd, and so on up to Person 100. Which lockers remain open at the end — and how did Khoisnam know in advance?
Key idea — count the toggles. Locker number \(N\) is toggled once by every person whose number is a factor of \(N\). So the number of times a locker is toggled equals the number of factors of its locker number.
A locker starts closed. It ends open only if it is toggled an odd number of times. So:
Why squares are special. Factors come in partner pairs whose product is \(N\) (for 6: \(1\times6\) and \(2\times3\)). Each pair contributes 2 factors — an even count. The only way to get an odd count is when one factor pairs with itself, i.e. \(\sqrt{N}\times\sqrt{N}=N\). That happens precisely for perfect squares.
Among 1 to 100 the perfect squares are \(1^2,2^2,\dots,10^2\). Khoisnam simply listed the squares up to 100.
AnswerOpen lockers: 1, 4, 9, 16, 25, 36, 49, 64, 81, 100.