0

Characterize the solution of a Diophantine equation

$$x^2+py^2=z^2$$ where $p$ is a prime of the form $p\equiv 1 \pmod4$ and $(x,y,z)=1$.

Consider every possible cases.

  • This closely resembles http://math.stackexchange.com/questions/1079792/for-a-diophantine-equation-x2py2-z2-show-that-z-is-necessarily-odd – user133281 Dec 27 '14 at 18:08

2 Answers2

2

We can assume $x,y,z$ are pairwise coprime. We know that $z$ is odd and the parity of $x$ and $y$ are different. Finally, all variables used are integers.

Case 1: $x$ is odd, $y$ is even.

Then we can rearrange the above equation to

$$\left( \frac{z+x}2 \right) \left( \frac{z-x}2 \right) = p \left( \frac{y}2 \right)^2.$$

Now if $d = \gcd\left(\frac{z+x}2, \frac{z-x}2 \right)$,

$$d|\left(\frac{z+x}2 + \frac{z-x}2 \right) \implies d|z$$

and similarly,

$$d|\left(\frac{z+x}2 - \frac{z-x}2 \right) \implies d|x.$$

Therefore, $d = 1$. Thus, we have two subcases.

Sub Case 1:

$$\frac{z+x}2 = pa^2, \frac{z-x}2 = b^2$$

which gives

$$(x,y,z) = (pa^2-b^2, 2ab, pa^2+b^2).$$

Sub Case 2: $$\frac{z+x}2 = a^2, \frac{z-x}2 = pb^2$$

which gives

$$(x,y,z) = (a^2-pb^2, 2ab, a^2+pb^2).$$

Case 2: $y$ is odd, $x$ is even. This shouldn't bee too different from Case 1. See if you can finish it.

  • See if I am correct

    Case 2: $y$ is odd, $x$ is even.$$( z+x)( z-x) = p ( y)^2.$$

    Now if $d = \gcd(z+x, z-x)$, then $d\neq 2k$ since both $(z+x)$ and $(z-x)$ are odd. But

    $$d|(z+x + z-x) \implies d|(2z)$$

    which implies $\color{#66f}{d=1}$.

    – user194772 Dec 29 '14 at 12:50
0

$x^2+y^2\equiv z^2\pmod 4$ and $(x,y,z)=1$, so $z$ is odd, and so exactly one of $x,y$ is even.


If $x=2x_1$, then $$py^2=(z+2x_1)(z-2x_1)$$

$\gcd(z+2x_1,z-2x_1)=\gcd(x_1,z)=\gcd(x,z)=1$
(since if $q\mid x,z$, then $q\mid y$, but $(x,y,z)=1$, contradiction).

If $z+2x_1=pa^2, z-2x_1=b^2$, where $y=ab, a,b\in\mathbb Z, \gcd(a,b)=1, a,b$ are odd, then $x=\frac{pa^2-b^2}{2}, z=\frac{pa^2+b^2}{2}$, thus $y=\pm ab$. This works.

If $z+2x_1=b^2, z-2x_1=pa^2$, where $y=ab, a,b\in\mathbb Z, \gcd(a,b)=1, a,b$ are odd, then $x=\frac{b^2-pa^2}{2}, z=\frac{b^2+pa^2}{2}$, thus $y=\pm ab$. This works.


If $y=2y_1$, then $$py^2=\left(\frac{z+x}{2}\right)\left(\frac{z-x}{2}\right)$$

$\gcd(\frac{z+x}{2},\frac{z-x}{2})=\gcd(x,z)=1$
(since if $q\mid x,z$, then $q\mid y$, but $(x,y,z)=1$, contradiction).

If $\frac{z+x}{2}=pa^2, \frac{z-x}{2}=b^2$, where $y=ab, a,b\in\mathbb Z, \gcd(a,b)=1$, then similarly we can get that this time $x=pa^2-b^2$, $z=pa^2+b^2$, and so $y=\pm 2ab$. This solutions works.

If $\frac{z+x}{2}=b^2, \frac{z-x}{2}=pa^2$, where $y=ab, a,b\in\mathbb Z, \gcd(a,b)=1$, then similarly we can get that this time $x=b^2-pa^2$, $z=b^2+pa^2$, and so $y=\pm 2ab$. This solution works.


Therefore, all the solutions are generated by

$$(x,y,z)=(\pm\left(\frac{b^2-pa^2}{2}\right),\pm ab, \frac{b^2+pa^2}{2}), a,b\in\mathbb Z, \gcd(a,b)=1, a\equiv b\equiv 1\pmod 2$$

$$(x,y,z)=(\pm(b^2-pa^2), \pm2ab, b^2+pa^2), a,b\in\mathbb Z, \gcd(a,b)=1$$

Some of the $\pm$ signs are redundant, so all the solutions are generated by

$$(x,y,z)=(\pm\left(\frac{b^2-pa^2}{2}\right),ab, \frac{b^2+pa^2}{2}), a,b\in\mathbb Z, \gcd(a,b)=1, a\equiv b\equiv 1\pmod 2$$

$$(x,y,z)=(\pm(b^2-pa^2), 2ab, b^2+pa^2), a,b\in\mathbb Z, \gcd(a,b)=1$$

user26486
  • 11,331
  • Actually, $$ (x,y,z) = \left( ; \left| \frac{b^2 - p a^2}{2} \right|, ; ab, ; \frac{b^2 + p a^2}{2} ; \right) $$ with $a,b$ odd and coprime are valid solutions and should not have been ruled out. – Will Jagy Dec 27 '14 at 21:55
  • 1
    @WillJagy It was a computational error, I've fixed everything. – user26486 Dec 27 '14 at 23:07