Maths Olympiad Prep

Library / /25 of 37

Number theory Difficulty 5.8 AIME, harder Prove it Italy

Problem:

The difference of two positive integers aa and bb is a prime number pp and their product is a perfect square not exceeding 1000010000. What is the maximum value that pp can assume?

Solution

Solution:

The answer is 1919. Indeed, suppose without loss of generality that a>ba > b; then a=b+pa = b + p and ab=b(b+p)ab = b(b + p).

If now pp divided bb we could set b=pbb = p b', and we would have that
ab=pb(pb+p)=p2b(b+1) ab = p b' (p b' + p) = p^2 b'(b' + 1)
would be a perfect square; but since bb' and b+1b' + 1 are coprime, this would mean that both bb' and b+1b' + 1 would be perfect squares, which is impossible (the only case in which this occurs among the integers, namely when b=0b' = 0, is excluded by the hypothesis that bb is positive).

Therefore aa and bb must be coprime, and hence both perfect squares; we can therefore set a=n2a = n^2, b=m2b = m^2 with n,mn, m in turn positive. But from the fact that
p=ab=n2m2=(nm)(n+m) p = a - b = n^2 - m^2 = (n - m)(n + m)
is a prime number it follows that one of nmn - m and n+mn + m (and it will evidently be nmn - m) must be 11. Hence n=m+1n = m + 1, aa and bb are two consecutive squares and the sum n+mn + m of their square roots must be the prime number pp.

However, since by hypothesis ab10000ab \leq 10000, a100a \leq 100 and hence n10n \leq 10, m9m \leq 9 and therefore p=n+m19p = n + m \leq 19; and precisely the case a=100a = 100, b=81b = 81, n=10n = 10, m=9m = 9, p=19p = 19 turns out to fall within the hypotheses of the problem, hence 1919 is the maximum possible prime.

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: MathNet, licensed CC-BY-4.0. Statement translated into English from it; metadata (topic, difficulty) added by this project.