Question 213494: There are 500 students and 500 lockers, numbered 1 through 500. Suppose the first student opens each locker. Then the second student closes every second locker. The thrid student changes the state of every third locker. The fourth student changes the state of every fourth locker. This process continues until the 500th student changes the state of 500th locker. Which lockers are open?
Answer by solver91311(24713) (Show Source):
You can put this solution on YOUR website!
A student is going to touch, i.e. change the state of, any locker which number is evenly divisible by the student's number. Let's see if we can find a pattern.
Take Locker 20 for example, Students 1, 2, 4, 5, 10, and 20 but no others touch that locker. That is, the state of that locker changes 6 times. 6 is an even number. If something changes its binary state an even number of times, then it is back to its original state. Locker 20 started out closed, so it will be closed at the end.
Locker 17: Students 1 and 17 and no others. Even number of state changes.
Locker 9: Students 1, 3, and 9. Ah ha! An odd number of changes. Hmmm...
Locker 16: Students 1, 2, 4, 8, and 16. 5 changes, again odd.
So, if you can figure out what is special about 9 and 16 as compared to other numbers, you will have your answer.
John

|
|
|