Math Fun Facts!
hosted by the Harvey Mudd College Math Department created, authored and ©1999-2010 by Francis Su
Subscribe to our RSS feed   or follow us on Twitter.
Get a random Fun Fact!
No subject limitations
Search only in selected subjects
    Calculus or Analysis
    Number Theory
    Other subjects
  Select Difficulty  
Enter keywords 

  The Math Fun Facts App!
  List All : List Recent : List Popular
  About Math Fun Facts / How to Use
  Contributors / Fun Facts Home
© 1999-2010 by Francis Edward Su
All rights reserved.

From the Fun Fact files, here is a Fun Fact at the Easy level:

Toggling Light Switches

Figure 1
Figure 1

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. <>.

Keywords:    number theory, combinatorics
Subjects:    combinatorics, number theory
Level:    Easy
Suggestions? Use this form.
Click to rate this Fun Fact...
    *   Awesome! I totally dig it!
    *   Fun enough to tell a friend!
    *   Mildly interesting
    *   Not really noteworthy
and see the most popular Facts!
New: get the MathFeed iPhone App!

Brings you news and views on math:
showcasing its power, beauty, and humanity

Want another Math Fun Fact?

For more fun, tour the Mathematics Department at Harvey Mudd College!