0
$\begingroup$

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.

$\endgroup$
  • 3
    $\begingroup$ $x$ is any number, $y=n(x+n)$ where $n\in\mathbb Z$. $\endgroup$ – Ivan Neretin Nov 3 '15 at 14:18
  • 1
    $\begingroup$ Given $x$, you can choose any $y=bx+b^2$, for $b$ any integer. $\endgroup$ – Thomas Andrews Nov 3 '15 at 14:19
  • $\begingroup$ @ThomasAndrews are these the only solutions?? $\endgroup$ – amcalde Nov 3 '15 at 14:24
  • 1
    $\begingroup$ @IvanNeretin Please write up the comment as an answer..It is pretty sweet. $\endgroup$ – Chinny84 Nov 3 '15 at 14:26
3
$\begingroup$

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$$

$\endgroup$
  • $\begingroup$ OK, I see that. I had got previously that $z$ and $x$ had to be the same parity so this make sense. $\endgroup$ – amcalde Nov 3 '15 at 14:30
  • $\begingroup$ One more point, is that $b$ must be greater than or equal to $-x/2$ or else I don't think it works because you'd get a negative value for $x^2 + 4y$. Add that condition and I'll accept. $\endgroup$ – amcalde Nov 3 '15 at 14:37
  • 2
    $\begingroup$ No, if $b<-x/2$ then it still works, just algebra. It is not possible fo4 $x^2+4(bx+b^2)=(x+2b)^2$ to be negative. @amcalde $\endgroup$ – Thomas Andrews Nov 3 '15 at 14:41
  • $\begingroup$ OK, yes. I see. Thanks! $\endgroup$ – amcalde Nov 3 '15 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.