Posted by josh on .
1000 lockers 1000 students, the first student goes along and opens every other locker. The second student goes along and shuts every other locker beginning with the number 2. The third student changes the state of every 3rd locker begining with the number 3 (if the locker is open the student shuts it and if closed the student opens it.the 4th student changes the state of every 4th locker begining with number 4. all students follow the pattern with the thousand lockers. at the end which lockers will be open and which will be closed? and why?
The solution is explained here:
Only locker numbers with an even number of factors remain open. Those turn out to be perfect squares: 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, .., 900 (31)^2=961
Count them up. I think you will get 31 open lockers