math

posted by .

the 20 students in Mr. Wolf's 4th grade class are playing a game in a hallway that is lined with 20 lockers in row. the 1 student starts with the first locker and goes down the hallways and opens all lockers. the 2 student starts with the second locker and goes down the hallway and shuts every others lockers. the third student starts with the third locker and changes every third locker: if the locker is open the student closes it, and if it is closed the student open it. the fourth student starts with the fourth locker and changes every fourth locker: if the locker is open the student closes it, and if it is closes the student opens it. THis process continues until all 20 students in the class have walked down the hallway. a.) which lockers are still open at the end of the game?. b.) which lockers were touched by the only two student?. c.) which lockers were touched by only three students?.d.) which lockers were touched the most?

• math -

Haven't devised an algebraic solution. Maybe you can work on that after taking a look at the table below, where row #n is the state of the lockers (0=closed, 1=open) after the nth student has gone by. The last line is the number of times each locker was touched.

01: 11111111111111111111
02: 10101010101010101010
03: 10001110001110001110
04: 10011111001010011111
05: 10010111011010111110
06: 10010011011110111010
07: 10010001011111111010
08: 10010000011111101010
09: 10010000111111101110
10: 10010000101111101111
11: 10010000100111101111
12: 10010000100011101111
13: 10010000100001101111
14: 10010000100000101111
15: 10010000100000001111
16: 10010000100000011111
17: 10010000100000010111
18: 10010000100000010011
19: 10010000100000010001
20: 10010000100000010000
1 2 2 3 2 4 2 4 3 4 2 6 2 4 4 5 2 6 2 6

• math -

thanks Steve And Happy new year and God bless you