Picture this, you have an array of 1,000,000 light bulbs, numbered 1 to 1,000,000, all of which are off (and all of which work).
The following task involves these light bulbs and an action we'll call "flipping". Flipping simply means changing the state of a light bulb. If the bulb is off, flipping will turn it on. If the bulb is on, flipping it will turn it off.
Starting with all the light bulbs off, you start at bulb #1, and flip the state of every bulb. Once you've done that, you go back and start with bulb #2, flipping the state of every second bulb. Next, you go back, start with bulb #3, and flip the state of every third bulb.
This continues all the way up to 1,000,000, where you flip the state of every "millionth" bulb (obviously, just the one bulb).
Here's the question: After performing this massive task, which light bulbs will be on, and which light bulbs will be off?
Enjoy!
Ryan Jones