When is $x^2 + 4y$ a square?

116 Views Asked by At

Sorry if this is a duplicate. And I probably knew this at one point in my life. But I can't remember or seem to find this easily. Can anyone point me in the right diophantine direction?

For $x,y \in\mathbb{Z}$ when is $(x^2 + 4y)$ a square? In particular I am interested in generating all solutions to this Diophantine equation:$$x^2 + 4y = z^2$$ within some bounds for $x$ and $y$, say $|x| < 1000$ and something similar for $y$. Is there a quick way to do something like this (the generation of solutions)?

I know that $z^2 - x^2$ factors so I can, for example, factor $4y$ and list those out for $(z-x)$ and $(z+x)$ but I'm sure there is actually a parametrization of the solutions.

I used to have a great link to a great site that listed the best known ways of generating solutions to all sort of Diophantine equations. But nothing gold can stay, and I've lost the link. If anyone knows what I'm talking about and can provide that link I'd be very grateful as well.

Many thanks for any help.

1

There are 1 best solutions below

4
On BEST ANSWER

If $z=x+c$ then $4y=2cx+c^2$. Thus $c$ is divisible by $2$, say $c=2b$. Then you get: $$y=bx+b^2$$