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.Com
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)   (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.

RELATED QUESTIONS

A Christmas tree light has an expected life of 200 hr and a standard deviation of 2 hr.... (answered by stanbon)
6. Gary hung seven strings of holiday lights on his house. Some strings had 75 lights... (answered by josmiceli)
On a Christmas tree a first set of ligjts flashes every 3 seconds, a second set of lights (answered by ankor@dixie-net.com)
Three are three traffic lights along the route that Ama rides from school to her home.... (answered by Fombitz,Theo)
A very long hallway has 100 lights with pull cords hanging from the ceiling. All the... (answered by solver91311)
There are three sets of traffic lights on Zimmer’s journey to work. The independent... (answered by ikleyn)
Xavier works in an amusement park and is helping decorate it with strands of lights. This (answered by ikleyn)
You have a string of blinking lights. The blue lights blink every 5 seconds and the red... (answered by addingup,MathTherapy)
My daughter has this as an extra credit question and she could really use the points and... (answered by joyofmath,brandonpark2889)