Problem

Source: 2021 Turkey JBMO TST P6

Tags: number theory, modular arithmetic, number theory proposed



Integers a1,a2,an are different at mod n. If a1,a2a1,a3a2,anan1 are also different at mod n, we call the ordered n-tuple (a1,a2,an) lucky. For which positive integers n, one can find a lucky n-tuple?