MathDB
Turning lamps on and off

Source: 2021 Simon Marais, B2

November 2, 2021
combinatorics

Problem Statement

Let nn be a positive integer. There are nn lamps, each with a switch that changes the lamp from on to off, or from off to on, each time it is pressed. The lamps are initially all off. You are going to press the switches in a series of rounds. In the first round, you are going to press exactly 11 switch; in the second round, you are going to press exactly 22 switches; and so on, so that in the kkth round you are going to press exactly kk switches. In each round you will press each switch at most once. Your goal is to finish a round with all of the lamps switched on. Determine for which nn you can achieve this goal.