Problem

Source: Dutch BxMO TST 2018 p3

Tags: number theory, prime numbers, Divisibility



Let $p$ be a prime number. Prove that it is possible to choose a permutation $a_1, a_2,...,a_p$ of $1,2,...,p$ such that the numbers $a_1, a_1a_2, a_1a_2a_3,..., a_1a_2a_3...a_p$ all have different remainder upon division by $p$.