Find integer solutions to the equation $2^x+3^y=z^2$

107 Views Asked by At

Here's my approach:

Since $2^x$ is always even we can rewrite it as $2k$, and similarly $3^y$ is always odd so we can write it as $2m+1$. The sum is equated to a square so $z^2=4r+1$ (it is always an odd square since odd +even is always odd) but after this I do not know what to do.

2

There are 2 best solutions below

1
On

Hint: Say $y>0$ then $3\mid 3^y$, using $\pmod 3$ we see that $x$ must be even so $x=2t$ and now we have $$3^y = (z-2^t)(z+2^t)$$

Now $z-2^t = 3^m$ and $z+2^t = 3^n$ so $$2^{t+1} = 3^m+3^n = 3^m(1+3^{n-m})$$

and so $m=0$ and so on...

0
On

First, deal with the small cases: $x=0, x=1$ or $y \leq 2$. Reduce the equation modulo some numbers to infer some properties of $x$ or $y$, eg if $x>1$, $y$ is even. Then you can factor $2^x=z^2-3^y$, and since it is a power of two the smallest factor must divide the other and must divide $2^x$. Then it is up to you.