Need help with this problem from School 
At Dunbar Highschool, there are 500 lockers, numbered 1 through 500. Suppose the first student opens each locker. Then the second student closes every second locker. The third student changes the state of every third locker (that is, closes the ones that were open and opens the ones that were closed). The fourth student changes the state of every fourth locker. this process continues until the 500th student changes the state of the 500th locker. Which lockers are left open at the end?
At Dunbar Highschool, there are 500 lockers, numbered 1 through 500. Suppose the first student opens each locker. Then the second student closes every second locker. The third student changes the state of every third locker (that is, closes the ones that were open and opens the ones that were closed). The fourth student changes the state of every fourth locker. this process continues until the 500th student changes the state of the 500th locker. Which lockers are left open at the end?