Maths Olympiad Prep

Library / /61 of 104

Number theory Difficulty 5.9 AIME, harder Prove it Bulgaria

Problem:
Find all four-digit positive integers mm less than 20052005 for which there exists a positive integer n<mn < m, such that mnmn is a perfect square and mnm - n has at most three distinct positive divisors.

Solution

Solution:
The number mnm - n has at most three different positive divisors if and only if mn=pkm - n = p^k, where pp is a prime and k{0,1,2}k \in \{0, 1, 2\}. If k=0k = 0 then m=n+1m = n + 1 and n(n+1)n(n + 1) is a perfect square, which is impossible.

Let mn=pkm - n = p^k, mn=t2mn = t^2, where k{1,2}k \in \{1, 2\} and tt is a positive integer. Then
n(n+pk)=t2(2n+pk2t)(2n+pk+2t)=p2k n\left(n + p^k\right) = t^2 \Longleftrightarrow \left(2n + p^k - 2t\right)\left(2n + p^k + 2t\right) = p^{2k}
Therefore 2n+pk2t=ps2n + p^k - 2t = p^s and 2n+pk+2t=pr2n + p^k + 2t = p^r, where rr and ss are integers, such that 0s<r2k0 \leq s < r \leq 2k and r+s=2kr + s = 2k.

For k=1k = 1 we have the unique possibility 2n+p2t=12n + p - 2t = 1, 2n+p+2t=p22n + p + 2t = p^2. Hence
n=(p1)24,m=n+p=(p+1)24 n = \frac{(p - 1)^2}{4}, \quad m = n + p = \frac{(p + 1)^2}{4}
Taking into account that 1000m<20051000 \leq m < 2005 we obtain the solutions m=1764m = 1764, 16001600, 13691369, 12961296 and 11561156 (for p=83,79,73,71p = 83, 79, 73, 71 and 6767, respectively).

For k=2k = 2 we have (r,s)=(4,0)(r, s) = (4, 0) or (r,s)=(3,1)(r, s) = (3, 1). In the first case we get
n=(p21)24,m=n+p2=(p2+1)24 n = \frac{\left(p^2 - 1\right)^2}{4}, \quad m = n + p^2 = \frac{\left(p^2 + 1\right)^2}{4}
Now the inequalities 1000m<20051000 \leq m < 2005 imply that p=8p = 8 which is not a prime. In the second case we have m=p(p+1)2/4m = p(p + 1)^2 / 4, which gives the solutions m=1900m = 1900 and 13771377 (for p=19p = 19 and 1717, respectively).

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 reproduced verbatim; metadata (topic, difficulty) added by this project.