Iran 2015, TST2, D2, P2
We call a permutation $(a_1, a_2,\cdots , a_n)$ of the set $\{ 1,2,\cdots, n\}$ "good" if for any three natural numbers $i <j <k$, $n\nmid a_i+a_k-2a_j$. Find all natural numbers $n\ge 3$ such that there exists a "good" permutation of a set $\{1,2,\cdots, n\}.$
"Questions we can't answer are far better than answers we can't question"