Problem

Source: St. Petersburg MO 2017 Grade 9 P4

Tags: number theory



Each cell of a $3\times n$ table was filled by a number. In each of three rows, the number $1,2,…,n$ appear in some order. It is know that for each column, the sum of pairwise product of three numbers in it is a multiple of $n$. Find all possible value of $n$.