Question 7
Let $A, B, C$ be the colours of the three boxes, and assign to each number the colour of the box that contains it. Now the problem is to find the maximum value of $n$ such that it is possible to colour the numbers $1, 2, 3, \ldots, n$ with the colours $A, B, C$ so that no two numbers of the same colour differ by the square of an integer.