I think it's that person 2 opens all the even-numbered doors, then person 3 changes-the-state-of (closes or opens, depending on what they already are) the multiples of three... etc.

It's a question of how many factors something has. Most numbers get their factors in pairs -- like 12 is 1x12, 2x6, 3x4.... but squares end up with that one in the middle... 16 for instance is 1x16, 2x8, 4x4. And since the #4 person only changes is once, it means that the locker door has been moved an odd number of times (including having been closed originally, then open, close, open, close) where all the non-squares are moved an even number of times (closed originally, open, closed, open, closed, open).


Erica