Problem

Source: Swiss MO 2023/2

Tags: combinatorics



The wizard Albus and Brian are playing a game on a square of side length $2n+1$ meters surrounded by lava. In the centre of the square there sits a toad. In a turn, a wizard chooses a direction parallel to a side of the square and enchants the toad. This will cause the toad to jump $d$ meters in the chosen direction, where $d$ is initially equal to $1$ and increases by $1$ after each jump. The wizard who sends the toad into the lava loses. Albus begins and they take turns. Depending on $n$, determine which wizard has a winning strategy.