Problem

Source: Bundeswettbewerb Mathematik 2018, Round 2, Problem 1

Tags: game, combinatorics, combinatorics proposed



Anja and Bernd take turns in removing stones from a heap, initially consisting of $n$ stones ($n \ge 2$). Anja begins, removing at least one but not all the stones. Afterwards, in each turn the player has to remove at least one stone and at most as many stones as removed in the preceding move. The player removing the last stone wins. Depending on the value of $n$, which player can ensure a win?