The Locker Problem

Drawing the first couple examples we can think through the scenario to see if we can find a pattern. First we notice that when a locker number has multiple divisors it'll be opened and closed that many times. So numbers with even divisors will start closed since student 1 closes all lockers we can start from closed which tells us that odd divisor number lockers will be closed and even number divisor lockers will be open. And the first locker each student interacts with will never be touched by another following student. So this means all prime numbers will be opened. So that gives us 168 open lockers. Adding on to that point, we also know that every number has an even number of divisors as to be divisible by something means a divisor has to have a "match", but perfect squares are the only exception as they have a number multiplied by itself making it an odd number of divisors. From 1 to 1000 there are 31 perfect squares including 1 so there should only be 31 closed lockers and the rest of them should be open. 


Comments

Popular posts from this blog

Group Art Project Write Up

Sept 23 Reading

September 14 Reading