Problem

Source: 2023 Thailand Online MO P3

Tags: number theory



Let $a$ and $n$ be positive integers such that the greatest common divisor of $a$ and $n!$ is $1$. Prove that $n!$ divides $a^{n!}-1$.