document.write( "Question 51262: In a particular school there are exactly 1000 lockers numbered 1 to 1000. In this school there happen to be exactly 1000 students. One day the math teacher has all of the students line up in the hallway. His instructions are as follows:
\n" ); document.write( "\"The locker doors are all closed at this time. I would like the first student to go to every locker and open the door. Next, I would like the second student to go to every second locker (#2,#4,#6...)and close the door. Then I would like the third student to go to every third Locker (#3,#6,#9...)and change the current status of the locker door ( if the door is open, close it, if it's closed then open it. Likewise, the fourth student will go to every fourth locker and change the door's status. this pattern will continue until all 1000 students have changed the door status of their appropriate lockers.\"
\n" ); document.write( "after all the students have gone through this process, which of the 1000 lockers will have open doors and which will have closed doors?\r
\n" ); document.write( "\n" ); document.write( "The only logical answer I could come up with is locker door #1 will be open and doors #2-1000 will be closed. Is this right?
\n" ); document.write( "Thanks so much for any input you can offer.
\n" ); document.write( "Bridget
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #272474 by richard1234(7193)\"\" \"About 
You can put this solution on YOUR website!
I believe I saw this problem on a previous AIME exam (American Invitational Mathematics Examination). This is indeed a classic problem. The solution involves how many integer factors each number has, but I'll leave up the rest to you (Try small cases!). \n" ); document.write( "
\n" );