A room has 100 light bulbs numbered 1 to 100. All the bulbs are initially in the "off" state. 100 persons go into the room one after the other. The first person changes the state ("off" to "on") of all the bulbs. The second person changes the state (switches it on if it is off, or switches it off if it is on) of all the bulbs which have even number (2,4, 6...100). The third person changes the state of all the bulbs which have a number divisible by 3 and so on. That is, the th person changes the state of all the bulbs which have a number divisible by .
How many light bulbs will be in the "on" state once all the 100 persons have done their job?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The number of factors which a number has, decides whether the bulb with that number is on or off. Any bulb with a number having even number of factors will be finally in the off state. The only numbers which have odd number of factors are squares. Therefore the bulbs numbered 1,4,9,16,25,36,49,64,81, and 100 will be in the on state and all other bulbs will be in the off state.