0

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.

amcalde
  • 4,674

1 Answers1

3

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

Thomas Andrews
  • 177,126
  • OK, I see that. I had got previously that $z$ and $x$ had to be the same parity so this make sense. – amcalde Nov 03 '15 at 14:30
  • 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. – amcalde Nov 03 '15 at 14:37
  • 2
    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 – Thomas Andrews Nov 03 '15 at 14:41
  • OK, yes. I see. Thanks! – amcalde Nov 03 '15 at 14:54