Problem

Source: IMO Shortlist 2017 N5

Tags: number theory, IMO Shortlist



Find all pairs $(p,q)$ of prime numbers which $p>q$ and $$\frac{(p+q)^{p+q}(p-q)^{p-q}-1}{(p+q)^{p-q}(p-q)^{p+q}-1}$$is an integer.