The Millennium school has \(1000\) students and \(1000\) student lockers. The lockers are in 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 first student), opens locker \(6\) (closed by the second student), closes locker \(9\), etc.

All the remaining students now walk in order, with the \(k\)th student changing the state of every \(k\)th locker, and this continues until all \(1000\) students have walked along the corridor.

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

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

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

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