The One With The POW (Oct. 1)

So basically, Casey has decided that he wants to give us more homework. This means that along with book work, we’ll have an additional question to answer each week that I’m guessing Casey himself will make up. You can find this week’s question here.

My initial thoughts after reading this are that the janitor needs to get a new hobby so I don’t have to calculate shit like this. But alas, I don’t think that’s the answer Casey is looking for. Basically, dude-man the janitor decided that this was a real-kick ass game he could play:

(1) Clean the school.
(2) Open all 1000 lockers.
(3) Close every other locker.
(4) Change every third locker.
(5) Change every fourth locker.
(6) Repeat until you change the 1000th locker.

So the question we’ve been asked is, which lockers will be open when the game is over?

I honestly had no idea how to tackle this problem at first so I decided to try and draw it out to see if I could pick up a pattern. I soon realized that that is tedious af, so I only drew it out through the sixth round for 10 lockers. Here are my results:

1000lockers

As you can see, there aren’t really any helpful pattern that will help you derive a universal equation, just pattern that will help you with one specific round. However, looking in round 2, you can see that all the even lockers are now closed. This is because even numbers are multiples of 2. This implies that when locker number is divisible by the number of the round, it will be changed. In more mathy language, locker \mathrm{n} will be changed when \mathrm{m}|\mathrm{n}, \mathrm{n}=\mathrm{ma} where \mathrm{n} is the locker number, \mathrm{m} is the round number, and \mathrm{a} is an arbitrary number.
So basically in round 2, the multiples of 2 will be changed, in round 3 the multiples of 3 will be changed, then multiples of 4, etc.

I noticed that in rounds 4 and 6, some of the lockers that had been affected in round 2 had been affected again. I noticed that by round 6 lockers 2 and 6 were closed again, but 4 was still open. So, I looked at the factors of 2, 4 and 6 to see what exactly they had in common. I noticed that 2 has 2 factors: 1and 2. The number 4 has 3 factors: 1,2, and 4. And that the number 6 has 4 factors: 1,2,3,and 6. I found it interesting that the closed lockers both had an even number of factors. I then had the realization that this made sense. If a locker number has an even number of divisors, it will be changed and even amount of times which means that the changes will eventually cancel out, therefore only lockers with an odd number will be open by the end of the game.

To figure out how many lockers there would be I took the square root of 1000 and got 31.6 something. This tells me that there will be 31 open lockers by the end. I knew to take the square root because I somehow recalled learning somewhere in my mathematical pursuits that all perfect squares have an odd number of factors, which means only lockers that are perfect squares will be open. Those lockers are:

1, 4, 9, 16,  25, 36, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, and 961

I got those numbers by squaring the numbers 1 through 31. I then felt worried that I was remembering the perfect square rule wrong so I actually checked the number of factors each locker had and they were all odd so I won’t bore anyone further with that information.

So there’s my answer and thought process behind this lovely POW.

Peace
Emily

PS. If anyone else is into metalcore type music, Crown the Empire just released a song called “Prisoner of War” and it’s almost all I could think of while working this problem out because they both have the initials POW. It’s a good song though.

2 thoughts on “The One With The POW (Oct. 1)

Leave a comment