Question 29275
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.