There is a wall with 1000 closed lockers on it. A person walks down the hall opening every other locker. Then the next person opens every 3rd locker. The next opens every fourth locker. The next every fifth locker.
Once this has been done, how many lockers are still closed?
Here's a twist to the problem:
The first person reverses the state of every second locker (2, 4, 6, ...). Thus, since they are all closed, then every second locker (2, 4, 6, ...) will now be open. The next person reverses the state of every third locker (3, 6, 9, ...). Thus, he will open #3 since it is closed, close #6 since it is open, open #9 since it is closed, etc. Then the next person reverses the state of every fourth locker (4, 8, 12, ...). Finally, the fifth person reverses the state of every fifth locker (5, 10, 15, ...). How many lockers are closed at the end?
I count 547, can anyone confirm or refute this?