Topic: There are one hundred closed lockers in a hallway. A man begins by opening all one hundred lockers. Next, he closes every second locker. Then he goes to every third locker and closes it if it is open or opens it if it is closed (e.g., he toggles every third locker). After his one hundredth pass in the hallway, in which he toggles only locker number one hundred, how many lockers are open?
// 1) A locker is toggled once for each factor of n, including itself and 1, 15= {1,2,5,15}
2) The number of factors need to be odd, so that the locker is open.
3) Only perfect squares satisfy, others must have the factor of 1 and itself.
So {1, 4, 9, 16…100}. Ten lockers are open finally.