You have a hundred, labeled, bulbs, turned off and a hundred, labeled, buttons.

When you begin pressing the button nº1, all bulbs turn on. When you then press the button nº2 all pair bulbs, begining by the 2n, turn off. When you press the button nº3, begining by the 3rd bulb, and all those which are multiples of 3, change their state. The ones that were off, light on, the ones turned of, go off.

You do the same by every button, finally having pressed, by order, all buttons from the first to the 100th. Question is, how many bulbs will be turned on at the end of the process? Which ones will it be?


As pointed out, this puzzle resembles Nerds, Jocks, and Lockers, being the question I asked a somehow simplyfied version of it. I'll leave the question as it is, in case anybody wants to try with this one. Of course, if that's not the case, I'll eventually end up closed.


10 lights are on - 1,4,9,16,25,36,49,64,81,100

A light is on if toggled an odd number of times (from before any switches are pressed) and off if toggled an even number of times

As each switch affects bulbs at positions that are integer multiples of the switch's position, the number of integer factors that each bulb has are what determines its end state.
Square numbers have the property that one of their factors is repeated (e.g. 1,3,3,9 for 9) - as each button is pressed only once, that state change isn't repeated, so the square-numbered bulbs are left lit at the end

That's a horribly convoluted description, but I couldn't come up with a more succinct way to summarise it


Every bulb's switch will be flipped for each of it's divisors. The bulbs that will be turned on will have an odd number of divisors. The only numbers for which that occurs are perfect squares. There will be ten lights turned on matching the 10 perfect squares less than or equal to 100.


Not the answer you're looking for? Browse other questions tagged or ask your own question.