Combinatorics, Serbia MO 2017
Source: Serbia National Mathematical Olympiad 2017, Day 1, Problem 3
April 1, 2017
combinatorics
Problem Statement
There are lamps in a row. In the beginning only the middle one is on (the -th one), and the other ones are off. Allowed move is to take two non-adjacent lamps which are turned off such that all lamps between them are turned on and switch all of their states from on to off and vice versa. What is the maximal number of moves until the process terminates?