Locker Problem/Proof 1

Proof
Lockers switch state when a student whose number is a factor of the locker's number makes a pass.

Because they start closed, only those lockers whose state has been switched an odd number of times will finish open.

By definition, any factor of a number $n$ has another (not necessarily distinct) matching factor such that the product of the two is $n$.

In most cases, these pairs of factor have distinct elements.

However, if the number in question is a square, then one of its pairs of factors is identical.

Indeed, both elements of the pair are the number's square root.

Thus:
 * square numbers will have their state switched an odd number of times, and will end up open
 * all other numbers will have their state switched an even number of times, and will end up closed.