Problem

Source: Indonesian MO 2022/5

Tags: number theory, INAMO 2022



Let $N\ge2$ be a positive integer. Given a sequence of natural numbers $a_1,a_2,a_3,\dots,a_{N+1}$ such that for every integer $1\le i\le j\le N+1$, $$a_ia_{i+1}a_{i+2}\dots a_j \not\equiv1\mod{N}$$Prove that there exist a positive integer $k\le N+1$ such that $\gcd(a_k, N) \neq 1$