Problem

Source: Final Round Grade 11 Pro 5

Tags: rotation, combinatorics unsolved, combinatorics



A pawn is placed on a square of a $ n \times n$ board. There are two types of legal moves: (a) the pawn can be moved to a neighbouring square, which shares a common side with the current square; or (b) the pawn can be moved to a neighbouring square, which shares a common vertex, but not a common side with the current square. Any two consecutive moves must be of different type. Find all integers $ n \ge 2$, for which it is possible to choose an initial square and a sequence of moves such that the pawn visits each square exactly once (it is not required that the pawn returns to the initial square).