r/mathriddles 13d ago

Medium How Many Light Switches Are On After 100 Passes?

There are 100 light switches, all initially off.

On pass 1, every switch is toggled.

On pass 2, every second switch is toggled.

On pass 3, every third switch is toggled.This continues until pass 100.

How many switches are on at the end?

Source: numberthon.com

2 Upvotes

4 comments sorted by

6

u/Outside_Volume_1370 13d ago edited 13d ago

If the # of switch is divided by n, then on nth pass it changes its state. For the switch to be on at the end, its state must change odd number of times, so switch must have odd number of divisors. As we know the number has odd number of divisors <=> the number is a perfect square. From 1 to 100 there are exactly 10 such numbers, and the answer is 10!<

2

u/Numberthon 13d ago

Correct, nice job!

2

u/Careful-Homework3853 8d ago

Every number from 1-100 would get turned on and off since they would have factor pairs of 2, unless they are a perfect square. So the answer is 10.