Find the sum of all positive integers n for which n2−19n+99 is a perfect square.
解析
Solution 1
If n2−19n+99=x2 for some positive integer x, then rearranging we get n2−19n+99−x2=0. Now from the quadratic formula,
n=219±4x2−35
Because n is an integer, this means 4x2−35=q2 for some nonnegative integer q. Rearranging gives (2x+q)(2x−q)=35. Thus (2x+q,2x−q)=(35,1) or (7,5), giving x=3 or 9. This gives n=1,9,10, or 18, and the sum is 1+9+10+18=38.
Solution 2
Suppose there is some k such that x2−19x+99=k2. Completing the square, we have that (x−19/2)2+99−(19/2)2=k2, that is, (x−19/2)2+35/4=k2. Multiplying both sides by 4 and rearranging, we see that (2k)2−(2x−19)2=37. Thus, (2k−2x+19)(2k+2x−19)=35. We then proceed as we did in the previous solution.
Solution 3
When n≥12, we have
(n−10)2<n2−19n+99<(n−8)2.
So if n≥12 and n2−19n+99 is a perfect square, then
n2−19n+99=(n−9)2
or n=18.
For 1≤n<12, it is easy to check that n2−19n+99 is a perfect square when n=1,9 and 10 ( using the identity n2−19n+99=(n−10)2+n−1.)