complete square of summation of odd numbers Suppose we have an integer(which may be odd or even), let us say for example $x=20$, also we have an odd number which is also known (let us say for example $y=39$).
Is there any formula that tell us how many consecutive odd numbers starting from $y$ that if we add them together with $x$, then we have a result of perfect square.
In our case, our perfect square will be : $perfect=100$, and it is $perfect=20+39+41$.
so the answer will be $2$ odd numbers (include the starting one).
any suggestions ?

Not an answer, but too much for a comment:
The sum of all the odd numbers below $y$ is $\left(\frac{y-1}2\right)^2$.  If you add $n$ odd numbers starting with $y$ the greatest is $y+2n-2$ and the sum of all the odd numbers up to that is $\left(\frac{y+2n-1}2\right)^2$.  You are then looking for
$$\left(\frac{y+2n-1}2\right)^2-\left(\frac{y-1}2\right)^2+x=n(y+n-1)+x$$
to be a perfect square.  I don't have any good ideas for that in the general case.
