Problem

Source: 42nd International Tournament of Towns, Junior A-Level P7, Spring 2021

Tags: combinatorics, Combinatorial Number Theory, Tournament of Towns, Kvant



Let $p{}$ and $q{}$ be two coprime positive integers. A frog hops along the integer line so that on every hop it moves either $p{}$ units to the right or $q{}$ units to the left. Eventually, the frog returns to the initial point. Prove that for every positive integer $d{}$ with $d < p + q$ there are two numbers visited by the frog which differ just by $d{}$. Nikolay Belukhov