Perfect squares in $S_i = i^2 + b \cdot i + c$

43 Views Asked by At

I need to find perfect squares ($S_i = x^2$) in sequence: $$S_i = i^2 + b \cdot i + c$$ where all numbers are natural: $$i,b,c,x \in \Bbb{N}$$

Now I use a straightforward approach, i just iterate over $i$ and check if $S_i$ is a perfect square. Is there a faster way of doing it?