Problem

Source: The problems from the 27th Macedonian Mathematical Olympiad

Tags: number theory, fermat's little theorem, GCD, Divisibility, prime numbers



Let $a, b$ be positive integers and $p, q$ be prime numbers for which $p \nmid q - 1$ and $q \mid a^p - b^p$. Prove that $q \mid a - b$.