SOLUTION: A string of lights on a christmas tree has 240 lights on it. The lights are numbered from 1 to 240. The lights turn on and off according to a certain pattern. At the beginning, all

Algebra ->  Test  -> Lessons -> SOLUTION: A string of lights on a christmas tree has 240 lights on it. The lights are numbered from 1 to 240. The lights turn on and off according to a certain pattern. At the beginning, all      Log On


   



Question 423190: A string of lights on a christmas tree has 240 lights on it. The lights are numbered from 1 to 240. The lights turn on and off according to a certain pattern. At the beginning, all lights are turned off. At the end of the first minute, all lights turn on. At the end of the second minute, every second light turns off. At the end of the third minute, every third light changes. If its off it turns on and if its on it turns off. At the end of the fourth minute, every fourth light changes. This pattern cotinues for 240 minutes. At the end of 240 minutes, which lights are off? Why?
Answer by richard1234(7193) About Me  (Show Source):
You can put this solution on YOUR website!
We see that for the nth switch, all multiples of n and only all multiples of n are being switched. Conversely, a number k is switched if and only if n is a factor of k.

In addition, numbers with an even number of integer factors will be switched an even number of times (hence, these lights will be off). Numbers with an odd number of integer factors will be switched an odd number of times, so these will be on at the end of 240 switches.

It can be easily shown that all perfect squares have an odd number of factors, and non-perfect squares have an even number of factors. From this, we conclude that all non-perfect squares (i.e. all integers except 1, 4, 9, ..., 225) will be off. There are 15 perfect squares, so the other 225 numbers remain off.