## Flickering Bulbs

What makes me like mathematics so much is that sense of wonder when I learn some new concept or idea. I highly doubt any other field (at least for me) so strongly creates a feeling of everything making sense. Interesting problems are great ways to see the innate intricacy of mathematics, and here is one which I heard of just yesterday.

In a dark, dusty room there lie 100 bulbs switched off, numbered 1-100. A number theorist comes across this room and decides to try something interesting. He first goes though all the multiples of 1, which are all the numbers, and flicks the switch on them, which turns them on. He then goes to all the bulbs which have numbers which are multiples of 2, and turns the switch on them, which would turn them off. Now he visits the bulbs which have numbers which are multiples of 3, and turns the switch on them, and they correspondingly turn either on or off. He does the same for the multiples of all the numbers 1 through 100, and then observes which bulbs are on, and which ones are off. What does he see?

Definitely try this problem out yourself, and when you have solved it (or given up), scroll below the picture.

To solve this problem, we could indeed write a program which runs through every iteration and flip flops the switches to see which ones are on at the end. But we want to this the mathematical way (or in other words the real way), and so we will instead use simple reasoning.

Under what circumstances will a bulb be off at the end? Well all of them started as being off, and so if the bulb was switched an even number of times, it will be off at the end. What does it mean to be switched an even number of times? This means that the number has an even number of factors (including 1 and itself).

So now when will the number be on? If it has an odd number of factors. Now when will this occur? I suggest you try it out yourself.

Soon, you will realize that all factors are in pairs with the exception of square roots, and so numbers that are square numbers therefore are the only ones that have an odd number of factors. The bulbs which are square numbers, 1, 4, 9… are on, and all the others are off.

And that’s it. No calculations, no steps, nothing. Wasn’t that cool?