
Help me find which rooms in the
mansion have the lights on.
Here's how to play:
There are 25 rooms in the mansion
and each room has one person staying overnight. The person from room #1
turns on the lights in every room of the mansion. The person from room
#2 turns off the lights in every room that is a multiple of 2 (that means
rooms 2,4,6,8,...20,22,24 have the lights turned off). The person from
room #3 changes the position of every light switch in every room that is
a multiple of 3 (that means room #3, which has the lights on, is then turned
off, and room #6, which now has lights off, has its lights turned on).
Remember that multiples of 3 are 3,6,9,12,15,18,... The person in
room #4 changes the position of every light switch whose room numbers are
multiples of 4 (remember multiples of 4 are 4,8,12,16,20,24). This pattern
continues for all 25 rooms.
Which rooms in the mansion will
have the lights on?