Problem

Source: 2012 European Girls’ Mathematical Olympiad P5

Tags: number theory, modular arithmetic, equation, EGMO, primes, GCD



The numbers $p$ and $q$ are prime and satisfy \[\frac{p}{{p + 1}} + \frac{{q + 1}}{q} = \frac{{2n}}{{n + 2}}\] for some positive integer $n$. Find all possible values of $q-p$. Luxembourg (Pierre Haas)