Problem

Source: European Mathematical Cup, 2015, Junior, P1

Tags: combinatorics, board, number theory



We are given an $n \times n$ board. Rows are labeled with numbers $1$ to $n$ downwards and columns are labeled with numbers $1$ to $n$ from left to right. On each field we write the number $x^2 + y^2$ where $(x, y)$ are its coordinates. We are given a figure and can initially place it on any field. In every step we can move the figure from one field to another if the other field has not already been visited and if at least one of the following conditions is satisfied: the numbers in those $2$ fields give the same remainders when divided by $n$, those fields are point reflected with respect to the center of the board. Can all the fields be visited in case: $n = 4$, $n = 5$? Josip Pupić