Problem

Source: 1st TASIMO Day2, Problem6

Tags: abstract algebra, number theory, complete residue system



We call a positive integer $n\ge 4$ beautiful if there exists some permutation $$\{x_1,x_2,\dots ,x_{n-1}\}$$of $\{1,2,\dots ,n-1\}$ such that $\{x^1_1,\ x^2_2,\ \dots,x^{n-1}_{n-1}\}$ gives all the residues $\{1,2,\dots, n-1\}$ modulo $n$. Prove that if $n$ is beautiful then $n=2p,$ for some prime number $p.$