Consider the following sequence:
$$a(k) = A + Bk + k^2 ,$$
where $A$ and $B$ are both integers, and $A < B$ ($k$ is of course an integer variable, B is even).
Problem:
For which $k^*$ is $a(k^*) = r^2$ (in other words for which $k$ the given sequence will yield a perfect square)?
Thanks in advance for any advice.
Here is the beginning of a systematic method in the case $B$ even, $B=2B'$:
"Complete the square" i.e., write your expression in the form
$$A'+(B'+k)^2=s^2 \ \ \ \leftrightarrow \ \ \ A'=(s-k-B')(s+k+B')$$
where $A'=A-B'^2$.
You have now to adjust the two parameters $k$ and $s$, but it opens the way for a systematic search by computer.