Problem

Source: Iran MO 3rd round 2016 finals - Number Theory P1

Tags: number theory, Iran, prime numbers, modular arithmetic



Let $p,q$ be prime numbers ($q$ is odd). Prove that there exists an integer $x$ such that: $$q |(x+1)^p-x^p$$If and only if $$q \equiv 1 \pmod p$$