Question 29275: At very long hotel in Arnold, MD, there are n rooms located along a very long corridor and numbered consecutively from 1 to n. One night after a party, n people, who have been likewise numbered 1 to n, arrived at this hotel and did as follows: guest 1 opens all the doors. Then guest 2 closed every second door beginning with door 2. Afterwards, guest 3 changed the position of every third door (that is the guest opened the doors that were closed and closed the doors that were open). In a similar way, guest 4 changed the position of doors 4,8,12,.... This process continued until each person had walked the length of the corridor. Of course, the last person, guest n, merely strolled to the end of the corridor, where the guest changed the position of door n. The question is, “Which doors were left open and which ones were left closed at the end of the process?"
Answer by 303795(602) (Show Source):
You can put this solution on YOUR website! 1. Door opened by person 1
2. Door opened by person 1 and closed by person 2
3. Door opened by person 1 and closed by person 3
4. Door opened by person 1 and closed by person 2 then opened by person 4
5. Door opened by person 1 and closed by person 5
6. Door opened by person 1 and closed by person 2 then opened by person 3 then closed by person 6
7. Door opened by person 1 and closed by person 7
8. Door opened by person 1 and closed by person 2 then opened by person 4 then closed by person 8
9 Door opened by person 1 and closed by person 3 then opened by person 9
At this stage the open doors are 1, 4 and 9. Each of these is a square number. Square numbers have an odd number of factors so the doors for each of these will be open.
All non-square numbers have an even number of factors so for each person who opens the door there is a corresponding person to close it. These doors will end up closed.
|
|
|