There are 100 light bulbs lined up in a row in a long room. Each bulb has its own switch and is currently switched off. The room has an entry door and an exit door. There are 100 people lined up outside the entry door. Each bulb is numbered consecutively from 1 to 100. So is each person. Person No. 1 enters the room, switches on every bulb, and exits. Person No. 2 enters and flips the switch on every second bulb (turning off bulbs 2, 4, 6, …). Person No. 3 enters and flips the switch on every third bulb (changing the state on bulbs 3, 6, 9, …). This continues until all 100 people have passed through the room.
What is the final state of bulb No. 64? And how many of the light bulbs are illuminated after the 100th person has passed through the room?
Answer will follow within a day!!
ReplyDeleteHere is the answer..
ReplyDeleteBulb #1 remains on.
All prime numbered bulbs remain off. Why? Because a prime has exactly two factors. 1 and the prime itself. Eg: 2,3,5,7,11, etc will all be off.
Among composite numbers, two kinds:
- Numbers with even number of factors will remain off.
- Numbers with odd number of factors will become on. Which means it should be a perfect square.
So only numbers that stay on are 1, 4, 9, 16, 25, 36, 49, 64, 81, 100.
Cool.... waiting for the next puzzle... I just saw and tried but was not able to answer the second one.
ReplyDelete