Oct 15, 2008

Problem # 3

The Locker Problem

There are 150 lockers numbered 1 to 150, all shut and unlocked. The school has 150 students. Suppose the first student goes along and opens every locker (starting at locker number 1). The second student shuts every second locker. The third student then changes the state of every third locker beginning with locker number 3 (If the locker is shut the student opens it, if the locker is open the student would shut it). The fourth student changes the state of every fourth locker beginning with locker number 4. Imagine that this pattern continues until every student (1-150) have followed this pattern. At the end, how many lockers will be open? Explain your thinking.