3^x + 4^y equals 5^z has Unique Solution

Theorem
The Diophantine equation:
 * $3^x + 4^y = 5^z$

has exactly one solution in (strictly) positive integers:


 * $3^2 + 4^2 = 5^2$

Proof
Rewriting our Diophantine equation Modulo 4 we have:
 * $\paren {-1}^x + 0^y \equiv 1^z \pmod 4$

Therefore $x$ is even.

Rewriting our Diophantine equation Modulo 3 we have:
 * $0^x + 1^y \equiv \paren {-1}^z \pmod 3$

Therefore $z$ is even.

Since $x$ and $z$ must both be even, we will rewrite $x$ as $2 r$, $z$ as $2 s$ and notice that $4$ is $2^2$.

We now have:

We can see that the is a product consisting entirely of instances of $2$.

Therefore:


 * $\paren{5^s + 3^r} = 2^u$

and:
 * $\paren{5^s - 3^r} = 2^v$

where $u > v$ and $u + v = 2 y$.

Solving for $5^s$, we add the two equations and get:

Solving for $3^r$, we subtract the two equations and get:

Since both $5^s$ and $3^r$ are odd, $v$ must be equal to $1$.

Let $t = u - v$.

We now have:
 * $5^s = \paren {2^t + 1}$
 * $3^r = \paren {2^t - 1}$

Let us now consider the second equation Modulo 3:
 * $0 \equiv \paren{-1}^t - 1 \pmod 3$

Therefore t must be even.

We will rewrite the second equation above with $t$ as $2 w$:

We can see that the is a product consisting entirely of instances of $3$.

Therefore:


 * $ 3^m = \paren {2^w + 1}$

and:
 * $ 3^n = \paren {2^w - 1}$

where $m > n$ and $m + n = r$.

Subtracting the $2$ equations above we get:

Therefore $m = 1$ and $n = 0$.

From above:
 * $3^m = \paren {2^w + 1}$

therefore:
 * $w = 1$

Recall that $t = 2w$.

Therefore:
 * $t = 2$

and:
 * $5^s = \paren {2^t + 1}$
 * $3^r = \paren {2^t - 1}$

Therefore $r = 1$ and $s = 1$.

Finally recall that $x = 2r$ and $z = 2s$.

Therefore we arrive at the only possible solution in (strictly) positive integers:
 * $x = 2$, $y = 2$ and $z = 2$