Problem

Source: Indonesian Stage 1 TST for IMO 2022, Test 3 (Number Theory)

Tags: Order, number theory, identity, Divisibility



Given positive odd integers $m$ and $n$ where the set of all prime factors of $m$ is the same as the set of all prime factors $n$, and $n \vert m$. Let $a$ be an arbitrary integer which is relatively prime to $m$ and $n$. Prove that: \[ o_m(a) = o_n(a) \times \frac{m}{\gcd(m, a^{o_n(a)}-1)} \]where $o_k(a)$ denotes the smallest positive integer such that $a^{o_k(a)} \equiv 1$ (mod $k$) holds for some natural number $k > 1$.