The Corridor of 500 Lockers
A school corridor contains lockers numbered through , and every door starts open. Then students file through one at a time: student (for ) flips the state of every locker whose number is a multiple of — closing it if open, opening it if closed. So the first student flips every locker, the second flips lockers , and so on through student . Once everyone has passed, how many lockers stand open?
