Problem:
Find the sum of all positive integers n for which n2−19n+99 is a perfect square.
Solution:
If n2−19n+99=m2 for positive integers m and n, then 4m2=4n2−76n+396= (2n−19)2+35. Thus 4m2−(2n−19)2=35, or (2m+2n−19)(2m−2n+19)=35. The sum of the two factors is 4m, a positive integer, so the pair (2m+2n−19,2m−2n+19) can only be (1,35),(5,7),(7,5), or (35,1). Subtract the second factor from the first to discover that 4n−38 can be only −34,−2,2, or 34,from which it follows that n can only be 1,9,10, or 18.The sum of these integers is 38​.
The problems on this page are the property of the MAA's American Mathematics Competitions