Problem

Source: RMO 2019 P4

Tags: combinatorics, number theory, RMO



Consider the following $3\times 2$ array formed by using the numbers $1,2,3,4,5,6$, $$\begin{pmatrix} a_{11}& a_{12}\\a_{21}& a_{22}\\ a_{31}& a_{32}\end{pmatrix}=\begin{pmatrix}1& 6\\2& 5\\ 3& 4\end{pmatrix}.$$Observe that all row sums are equal, but the sum of the square of the squares is not the same for each row. Extend the above array to a $3\times k$ array $(a_{ij})_{3\times k}$ for a suitable $k$, adding more columns, using the numbers $7,8,9,\dots ,3k$ such that $$\sum_{j=1}^k a_{1j}=\sum_{j=1}^k a_{2j}=\sum_{j=1}^k a_{3j}~~\text{and}~~\sum_{j=1}^k (a_{1j})^2=\sum_{j=1}^k (a_{2j})^2=\sum_{j=1}^k (a_{3j})^2$$