Problem

Source: Bulgaria 1983 P1

Tags: Sequences, number theory



Determine all natural numbers $n$ for which there exists a permutation $(a_1,a_2,\ldots,a_n)$ of the numbers $0,1,\ldots,n-1$ such that, if $b_i$ is the remainder of $a_1a_2\cdots a_i$ upon division by $n$ for $i=1,\ldots,n$, then $(b_1,b_2,\ldots,b_n)$ is also a permutation of $0,1,\ldots,n-1$.