How to solve the Diophantine equation $an^2+bn+c=x^2$

101 Views Asked by At

Is there any way to know what integer values of $n$ will satisfy

$an^2 + bn + c = x^2$?

In other words, what values of $n$ will make $an^2 + bn + c$ a perfect square, with $a, b, c$ given?

For example, for

$ a = 100, b = 8784, c = 3491 $

we have $n= 127$, then the RHS will be $x^2=1653^2 = 2732409$.

While this example could be done easily with Excel, how can I solve the problem for general $(a,b,c)$?