MathDB
Find all possible values of q-p

Source: 2012 European Girls’ Mathematical Olympiad P5

April 13, 2012
number theorymodular arithmeticequationEGMOprimesGCD

Problem Statement

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