What are the necessary and sufficient conditions on $a,b,c \in \mathbb{Z}$ such that $am^2 + bm + c = x^2$ has infinitely many integer solutions $(m,x)$?
My original equation was $12m^2 -12m +1 = x^2$ but I have no idea how to prove this has infinitely many solutions, by elementary methods, as this is for a maths olympiad.
I know that if $\sqrt{a} \in \mathbb{Z}$ and $b = 2\sqrt{a}$ then there are only finitely many solutions, but what if $\sqrt{a} \notin \mathbb{Z}$?
Thank you.
$x^2=am^2+bm+c$
Solution is,
$(a,b,c)=[(u),(vu-v),(pu-p)^2]$
$(x,m)=[(pu-v+p),(2p-v)]$
For $(u,v,p)=(3,2,7)$
$(a,b,c)=(3,4,196)$
$(x,m)=(26,12)$
$3(12)^2+4(12)+196=(26)^2$