Problem

Source: Serbian National Olympiad 2012, Problem 4

Tags: modular arithmetic, number theory proposed, number theory



Find all natural numbers $n$ for which there is a permutation $(p_1,p_2,...,p_n)$ of numbers $(1,2,...,n)$ such that sets $\{p_1 +1, p_2 + 2,..., p_n +n\}$ and $\{p_1-1, p_2-2,...,p_n -n\}$ are complete residue systems $\mod n$.