MathDB
n electric switches on control board of a nuclear station

Source: Estonia IMO TST 2007 p1

March 28, 2020
combinatorics

Problem Statement

On the control board of a nuclear station, there are nn electric switches (n>0n > 0), all in one row. Each switch has two possible positions: up and down. The switches are connected to each other in such a way that, whenever a switch moves down from its upper position, its right neighbour (if it exists) automatically changes position. At the beginning, all switches are down. The operator of the board first changes the position of the leftmost switch once, then the position of the second leftmost switch twice etc., until eventually he changes the position of the rightmost switch n times. How many switches are up after all these operations?