Friday, September 13, 2024

Locker problem

I encountered a similar problem before, but it involved light bulbs instead of lockers, and I couldn’t solve it at the time. This time, I started by drawing a sample of the first 10 lockers, using "1" for open and "0" for closed. I noticed that there were 4 prime-numbered lockers (#2, 3, 5, and 7), which were opened by the first student and then closed by the 2nd, 3rd, 5th, or 7th student, respectively. This led me to realize that lockers numbered with prime numbers would ultimately be closed.

After I asked Saiya for a hint, she helped me recognize a pattern with composite numbers. Most composite numbers have an even number of factors, and these factors can be paired—for example, 10 has 4 factors: 1 and 10, 2 and 5. However, some composite numbers, like 9, have an odd number of factors (1, 3, and 9). I then realized that composite numbers that are perfect squares (such as 1, 4, 9, and so on) have an odd number of factors.

Lockers with composite numbers that have an even number of factors will end up closed, as their state is changed an even number of times. However, lockers with an odd number of factors (i.e., those numbered with perfect squares) will remain open. Therefore, after 1000 students have taken their turns, only lockers with perfect square numbers will be open. Since there are 31 perfect squares between 1 and 1000 (with 961, or 31², being the largest), 31 lockers will remain open, and 969 will be closed in the end.






1 comment:

  1. when you noticed the prime numbers would close, what made you ask for a hint rather than explore further? Could there be a way to encourage students to discover the pattern of perfect squares on their own?

    ReplyDelete

Final reflection

Looking back at my posts this term, it’s exciting to see how much I’ve grown in both my knowledge and teaching strategies through this cours...