# Solving Exponential Equation with 3 variables

Solve in positive integers the equation $3^x+4^y=5^z$.

My thoughts: I see that $x=2, y=2, y=2$ is a solution set from Pythagorean theorem and $x=0, y=1, z=1$ is a solution set from just plugging in numbers, but is there a method to solve these for solution sets and/or show these solutions are unique?

Note that:

$$3^x+4^y=5^z\tag{1}$$

translates into:

$$1^y\equiv(-1)^z\quad\text{(mod 3)}$$

This means that $z$ has to be even or:

$$z=2z_1$$

With that in mind the equation (1) becomes:

$$3^x+4^y=5^{2z_1}$$

$$3^x+2^{2y}=5^{2z_1}$$

$$3^x = 5^{2z_1}-2^{2y}$$

$$3^x = (5^{z_1}-2^{y})(5^{z_1}+2^{y})$$

Notice that $5^{z_1}$ and $2^{y}$ are not divisible by 3 and their sum and difference cannot be both divisible by 3 at the same time (the proof is elementary). So one factor (smaller) must be 1 and the second factor (bigger) must be a power of 3:

$$5^{z_1}-2^y=1\tag{2}$$ $$5^{z_1}+2^y=3^x$$

According to Catalan's conjecture (or Mihăilescu's theorem) equation (2) has no solutions for $y,z_1>1$. What remains to be done is to test a trivial case when $y=1$ or $z_1=1$.

For $y=1$ there is no solution for $z_1$ but for $z_1=1$ (which means $z=2$) we have a solution $y=2$.

If you replace $y=2$ and $z=2$ into (1), you get $x=2$.

There are no other solutions.

EDIT:

You don't have to use the Catalan's conjecture to prove that equation:

$$1 + 2^a=5^b\tag{3}$$

...has only one solution ($a=2,b=1$). Suppose now that $a\ge3$.

It means that LHS of (3) is equal to 1 (modulo 8). On the other side (again modulo 8): $5^1\equiv5$, $5^2\equiv1$, $5^3\equiv5$, $5^4\equiv1$...

So $b$ must be even, or $b=2b_1$.

Now consider the same equation, this time modulo 3:

$$1 + (-1)^a\equiv(-1)^{2b_1}$$

$$1 + (-1)^a\equiv1$$

...which is impossible for any value of $a$.