Problem:
Find the sum of all positive integers n such that n2+85n+2017​ is an integer.
Solution:
For all positive integers n,n2+85n+2017>n2+84n+1764=(n+42)2, and n2+85n+2017<n2+90n+2025=(n+45)2. Solving n2+85n+2017=(n+43)2 gives n=168, and solving n2+85n+2017=(n+44)2 gives n=27. The requested sum is 168+27=195​.
OR
Let m2=n2+85n+2017 so that 4m2=4n2+340n+8068=(2n+85)2+843. Then (2m−2n−85)(2m+2n+85)=843=3⋅281, from which it follows that 2m−2n−85=1 or 2m−2n−85=3. Thus either m=n+43 or m=n+44 as above.