We want to find set of all values that satisfy the following equation: $(a+ky)(a-ky)=gx$ All values are assumed to be nonzero integers. How does one set $x$ so that $a$ is not multiples of $y$ while there exist more than one unique solution set of other values? In this case, $a$, $k$ and $g$ are allowed to change, while $y$ must be fixed. Also, how does one compute the number of possible combinations of solutions? How does the value of $x$ relate to the number of possible solutions?
With the same constraint, what happens if $g$ is fixed to 1? And with the same constraint, what happens if we allow for $k$ of each solution to be a fraction of the form $1/q$ where $q$ is some factor of $y$ and $q$ of each solution does not have any prime factor that is a prime factor of $q$ of other solutions?