第 715 题:(2017 AIME II, 6)
Find the sum of all positive integers $n$ such that $\sqrt{n^2+85n+2017}$ is an integer.
- If $n^2+85n+2017=m^2$, then $(2n+85)^2+843=(2m)^2$, so $(2m-2n-85)(2m+2n+85)=843=3\cdot281$.
- The pairs $(1,843)$ and $(3,281)$ give $2n+85=421$ and $139$, i.e.\ $n=168$ and $27$.
- The sum is $195$. The answer is $\boxed{195}$.
Find the sum of all positive integers $n$ such that $\sqrt{n^2+75n+2024}$ is an integer.