There are 100 lockers in a hallway, all closed. 100 students walk by one at a time. The first student opens every locker. The second student closes every 2nd locker. The third student toggles every 3rd locker. This continues for all 100 students. Which lockers are open at the end?
Common Wrong Answers
“All lockers are open”
This is incorrect because the toggling process means many lockers will be closed after the students pass, specifically those that are not perfect squares.
“Only the odd numbered lockers are open”
This is wrong because the pattern of opening and closing the lockers does not depend solely on whether a locker number is odd or even, but rather on the number of times each locker is toggled, which is determined by its divisors.
“Lockers 1 to 50 are open”
This guess is incorrect because, while some lockers within that range may be open, many will be closed due to the toggling pattern, and specifically, only perfect squares remain open.
Similar Brain Teasers
More brain teasers you might enjoy
A windowless room contains three identical light fixtures, each containing an identical light bulb. Each light is connected to one...
What has many keys but can't open any locks?
If you wrote all the numbers from 1 to 100, how many times would you write the digit 9?
I have keys but no locks. I have space but no room. You can enter but can't go inside. What am I?