Originally Posted by

**Aquafina** A school has 1000 students and 1000 student lockers. The lockers are in

a line in a long corridor and are numbered from 1 to 1000.

Initially all the lockers are closed (but unlocked).

The first student walks along the corridor and opens every locker.

The second student then walks along the corridor and closes every second locker, i.e. closes lockers 2, 4, 6, etc. At that point there are 500 lockers that are open and 500 that are closed.

The third student then walks along the corridor, changing the state of every third locker.Thus s/he closes locker 3 (which had been left open by the _rst student), opens locker 6 (closed by the second student), closes locker 9, etc.

All the remaining students now walk by in order, with the kth student changing the state of every kth locker, and this continues until all 1000 students have walked along the corridor.

i) How many lockers are closed immediately after the third student has walked along the corridor? Explain your reasoning.

(ii) How many lockers are closed immediately after the fourth student has walked along the corridor? Explain your reasoning.

(iii) At the end (after all 1000 students have passed), what is the state of locker 100? Explain your reasoning.

(iv) After the hundredth student has walked along the corridor, what is the state of locker 1000? Explain your reasoning.