Quoto

Learn / Library / Brainteasers

Spotlights over a stage

BrainteasersEasy

A stage has spotlights numbered to , all off. A lighting crew makes passes: in pass they toggle every spotlight, in pass every spotlight whose number is even, and in pass every spotlight whose number is a multiple of . Toggling turns a spotlight on if it is off and off if it is on. How many spotlights are on after the passes?

Checking an answer needs JavaScript. The hint and the solution open without it.

A whole number, a decimal, a fraction like 3/8 or a percent.

Hint

A spotlight is on when it was toggled or times.

Solution
  1. Every spotlight is toggled in pass , so it ends on exactly when passes and together toggle it an even number of times.
  2. That happens when the number is divisible by both and , or by neither.
  3. Up to there are multiples of , and numbers divisible by neither.
  4. So spotlights are on, and the answer is .

Answer: