Maths Olympiad Prep

Library / /3 of 18

Number theory Difficulty 5.5 AIME, harder Prove it Belarus

Find all pairs (n;m)(n; m) of positive integers nn and mm satisfying the equality
n!+505=m2. n! + 505 = m^2.

Solution

Answer: (4;23)(4; 23), (5;25)(5; 25), (6;35)(6; 35).
It is easy to see that the numbers 1!+505=5061! + 505 = 506, 2!+505=5072! + 505 = 507, 3!+505=5113! + 505 = 511 are not perfect squares. Further, 4!+505=529=2324! + 505 = 529 = 23^2, 5!+505=625=2525! + 505 = 625 = 25^2, 6!+505=1225=3526! + 505 = 1225 = 35^2. So we have three pairs (4;23)(4; 23), (5;25)(5; 25), (6;35)(6; 35) satisfying the problem conditions.

Show that there are no other solutions of the initial equation. Indeed, the numbers 7!+505=55457! + 505 = 5545 and 9!+505=3633859! + 505 = 363385 are not perfect squares since they are divisible by 55 but they are not divisible by 2525. The number 8!+505=40825=2516338! + 505 = 40825 = 25 \cdot 1633 is not a perfect square since 16331633 is not a perfect square. At last, if n10n \ge 10, then the decimal representation of n!n! ends by at least two zeros, so the decimal representation of the number n!+505=m2n! + 505 = m^2 ends with the digits 0505. Therefore, this number is divisible by 55 but is not divisible by 2525, so this number is not a perfect square.

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.