Why Only Square-Number Bulbs Stay On: A Simple Ruby Demo
A third‑grader’s bulb‑toggling puzzle is solved by showing that a bulb stays on only when its number is a perfect square, leading to 14 lit bulbs out of 200, and a simple Ruby program is used to demonstrate the result.
