Maths Olympiad Prep

Library / /31 of 115

Number theory Difficulty 7.0 National olympiad, round 2 Find the answer

Find all pairs of primes (p,q)(p, q) for which pqp-q and pqqpq-q are both perfect squares.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Since q(p1)q(p-1) is a perfect square and qq is prime, we should have p1=qb2p - 1 = qb^2 for some positive integer bb . Let a2=pqa^2 = p - q . Therefore, q=pa2q = p - a^2 , and substituting that into the p1=qb2p - 1 = qb^2 and solving for pp gives p=a2b21b21=(ab1)(ab+1)b21.p = \frac{a^2b^2 - 1}{b^2 - 1} = \frac{(ab - 1)(ab + 1)}{b^2 - 1}. Notice that we also have p=a2b21b21=a2+a21b21p = \frac{a^2b^2 - 1}{b^2 - 1} = a^2 + \frac{a^2 - 1}{b^2 - 1} and so b21a21b^2 - 1 | a^2 - 1 . We run through the cases
: Then so , which works. : This means , so , a contradiction. : This means that . Since can be split up into two factors such that and , we get
p=ab1F1ab+1F2p = \frac{ab - 1}{F_1} \cdot \frac{ab + 1}{F_2} and each factor is greater than 11 , contradicting the primality of pp .
Thus, the only solution is (p,q)=(3,2)(p, q) = (3, 2) .

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.