I want to implement a fast algorithm (avoiding or at least minimizing bruteforce) which for a given square number $n$ calculates a series of positive integers $y$ up to a certain limit $l$ such that $n+y^2$ is again a perfect square?
I can obtain the trivial case $y=\frac{1}{2}(n-1)$ as described in the answer and comments on this question using the equation $(x-y)(x+y)=x^2-y^2$.
Example: Let us take $n=225(=15^2)$, we obtain one solution $y=\frac{1}{2}(225-1)=112$ directly. But how we can obtain the whole list $(8, 20, 36, 112)$?
My ideas: As described here I came across the so called "Norm-Form Equation", which is a diophantine equation of the form $x^2-Dy^2=n$ and we have the special case $D=1$. To deal with this Norm-Form Equation, in his book Richard A. Mollin involves the divisor function.
Refering to our example, if we can deduce the other $y$-values $8,20,36$ from the (directly obtained) value $y=112$, it would allow me to speed up my bruteforce search drastically.
Note: If we cannot avoid bruteforce completely, I would be greateful for an approach that at least minimizes the search for these $y$-values.