# Diophantine equation

• Jul 6th 2010, 08:01 PM
Arczi1984
Diophantine equation
Hi, I've to solve the following diophantine equation (in positive integers):

$3^x-5^y=z^2$.

Thanks for any help.
• Jul 6th 2010, 08:34 PM
Also sprach Zarathustra
Quote:

Originally Posted by Arczi1984
Hi, I've to solve the following diophantine equation (in positive integers):

$3^x-5^y=z^2$.

Thanks for any help.

Maybe if we look the diophantine equation above $\mathbb{Z}_4=\{0,1,2,3\}$.

It seems (only in theory!) that the above diophantine equation had no solution in positive integers...

http://i48.tinypic.com/vopixx.jpg
• Jul 7th 2010, 12:18 AM
Opalg
Quote:

Originally Posted by Also sprach Zarathustra
It seems (only in theory!) that the above diophantine equation had no solution in positive integers...

It has at least one solution, because $3^2-5^1 = 2^2$.
• Jul 7th 2010, 12:27 AM
simplependulum
Quote:

Originally Posted by Arczi1984
Hi, I've to solve the following diophantine equation (in positive integers):

$3^x-5^y=z^2$.

Thanks for any help.

The solution is $(2,1,2)$

Take modulo $4$ we have

$(-1)^x - 1 \equiv z^2 \bmod{4}$

$x = 2t$ otherwise if $x$ is odd we have $z^2 \equiv -2 \equiv 2 \bmod{4}$ which is impossible .

Thus we have $3^{2t} - 5^y = z^2$

$(3^t)^2 - z^2 = 5^y$

$(3^t - z )(3^t + z ) = 5^y$ which leads to

$3^t - z = 5^{\alpha} ~,~ 3^t + z = 5^{\beta}$ where $\alpha + \beta = y$

$3^t = \frac{ 5^{\beta} + 5^{\alpha} }{2}$ which is the multiple of $5$ if $\alpha \beta > 0$ which is again impossible .

Thus $\alpha = 0$ ( not $\beta$ because $\alpha \leq \beta$ ) but they can't be both zero as we are looking for positive integers $y$

$3^t = \frac{ 1 + 5^y }{2} ~~~~,~ \beta = y-0 = y$

We now show that $(t,y) = (1,1)$ is the only solution .

Suppose $t \geq 2$ so we have

$\frac{ 1 + 5^y }{2} \equiv 0 \bmod{9} ~ \implies 1+ 5^y \equiv 0 \bmod{9}$

If we write down the first six powers of $5$ modulo $9$ , we obtain : $1,5,7,8,4,2,(1)$

we have exactly $5^6 \equiv 1 \bmod{9}$ and exactly $5^{3} \equiv -1 \bmod{9}$

We conclude that $y = 6k + 3 = 3(2k+1)$ for some non-negative integers $k$

Back to this equation : $3^t = \frac{ 1 + 5^y }{2}$

write $y = 3(2k+1) = 3m$ we have

$3^t = \frac{ (1+5^3)(1-5^3 + 5^6 - ... + 5^{3m-3} )}{2} = 9 \cdot 7P$ the multiple of $7$ which is also impossible .

Therefore , $0 < t \leq 1 ~ \implies t = 1$

$t=1$ is the only hope , luckily , we obtain $y = 1$ and $z =2$ , $(2,1,2)$ is the only solution .
• Jul 7th 2010, 06:18 AM
chiph588@
Quote:

Originally Posted by simplependulum
$t=1$ is the only hope , luckily , we obtain $y = 1$ and $z =2$ , $(2,1,2)$ is the only solution .

Just in case you didn't follow how simplependulum obtained $y=1$, if $y>1$ then $z^2=3^2-5^y<0$.