Toggling Light Switches

Imagine 100 light bulbs with light switches numbered 1 through 100, all in a row, all off. Suppose you do the following: toggle all switches that are multiples of 1, then toggle all switches that are multiples of 2, then toggle all switches that are multiples of 3, etc.

By the time you are finished (and have toggled multiples of 100, which is just the last switch), which light bulbs are on and which are off?

Fun fact: The light bulbs which are on are the ones numbered 1, 4, 9, 16, … all the squares!

Presentation Suggestions:
Draw a suggestive picture and work out whether the first few light bulbs are on or off. Let them see or conjecture a pattern, then have them (as a fun homework) see and figure out why it is true! Maybe a light bulb will go on when they do this!

The Math Behind the Fact:
The n-th light bulb is toggled once for every factor of n. Squares are the only numbers with an odd number of factors, which can be seen because every factor J of a number, has a co-factor K for which JK=n. This pairs up all the factors of n, unless J=K, which only occurs when n is a square.

How to Cite this Page: 
Su, Francis E., et al. “Toggling Light Switches.” Math Fun Facts. <https://www.math.hmc.edu/funfacts>.

Did you like this Fun Fact?

Click to rate it.

Average rating 3.8 / 5. Vote count: 26

No votes so far! Be the first to rate this Fun Fact

Share: