Question 182270
<font face="Times New Roman" size="+2">


All integers except for perfect squares have an even number of even divisors, including 1 and the integer itself.  Perfect squares have an odd number of divisors because the integer square root is a divisor.


Examples:


6 has 4 factors: 1, 2, 3, and 6.  Not a perfect square, even number of factors.


16 has 5 factors: 1, 2, 4, 8, 16. Perfect square, odd number of factors.


You could get all fancy and prove this fact by saying something along the lines of:  If <i>p</i> is an even divisor of integer <i>n</i>, then there is an integer quotient <i>q</i> that is also a divisor, hence divisors come in pairs.  Except for the case of a perfect square where <i>p</i> is the square root of <i>n</i> in which case the quotient is also <i>p</i>, making the exception to the 'divisors in pairs' rule. 


If Student number <i>s</i> touches locker <i>n</i>, then <i>s</i> must be an even divisor of <i>n</i>, according to the rules of the game.


Therefore, non-perfect square number lockers are touched an even number of times.  That is, if they started out closed, they end up closed.  Perfect square number lockers are touched an odd number of times -- if they started closed, they end up open.


John
*[tex \LARGE e^{i\pi} + 1 = 0]
</font>