Number theoryDifficulty 6.4National olympiadProve itRomania
Determine the four-digit natural numbers abcd, for which there exists a prime number p, such that cd−ab=p+2 and ab−4+cd=p2.
Solution
Since ab−4+cd<10+10=20, we obtain p=2 or p=3. If p=2, then cd=ab+4 and ab−4+ab+4=4, therefore ab=5, false. If p=3, then cd=ab+5 and ab−4+ab+5=9. We obtain the unique solution ab=20, thus abcd=2025.
Alternative solution: Since ab−4, cd and ab−4+cd are integers, the natural numbers k,n exist, such that ab−4=k2 and cd=n2, hence k+n=p2. (1) We obtain p+6=cd−ab+4=n2−k2=(n−k)(n+k). Using (1), we deduce that p+6=(n−k)⋅p2, therefore p∣(p+6), so p∈{2,3}. If p=2, we obtain k=1 and n=3, therefore ab=5, which is false. If p=3, we obtain k=4 and n=5, so ab=20 and cd=25, which satisfies the hypothesis. Therefore, the solution is 2025.
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 and solution reproduced as published; topic and difficulty added by this site.