Here's the problem:
- Suppose the first student goes along the row and opens every locker.
- The second student then goes along and shuts every other locker beginning with number 2.
- The third student changes the state of every third locker beginning with number 3. (If the locker is open the student shuts it, and if the locker is closed the student opens it.)
- The fourth student changes the state of every fourth locker beginning with number 4. Imagine that this continues until the thousand students have followed the pattern with the thousand lockers. At the end, which lockers will be open and which will be closed? Why?
Hint / Spoiler : http://www.math.msu.edu/~nathsinc/java/Lockers/
A related problem to prove the solution to the one above
How many perfect square factors does the number 46,656 have?
Those lockers that have even number of factors upto N will be closed :D
ReplyDeleteThe perfect numbers.
ReplyDelete