# Solution to puzzle 98: Three powers

Find all solutions of 3^{x} + 4^{y} = 5^{z}, for integers x, y, and z.

We will consider three separate cases: x > 0, x = 0, x < 0.

## Case x > 0

First of all, we note that x > 0 z > 0, and then y 0.

Considering 3^{x} + 4^{y} = 5^{z}, modulo 3, we obtain 1 (−1)^{z} (mod 3.)

Hence z is even.

Letting z = 2w, we may write 3^{x} as a difference of two squares:

3^{x} = 5^{2w} − 4^{y} = (5^{w} + 2^{y})(5^{w} − 2^{y})

By the Fundamental Theorem of Arithmetic, each factor must be a power of 3, but, as their sum is not divisible by 3, both cannot be multiples of 3.

Hence 5^{w} + 2^{y} = 3^{x} and 5^{w} − 2^{y} = 1.

Considering these equations, mod 3, we get

(−1)^{w} + (−1)^{y} 0 (mod 3)

(−1)^{w} − (−1)^{y} 1 (mod 3)

Adding, we obtain 2 × (−1)^{w} 1 (mod 3), from which (−1)^{w} −1 (mod 3), and so w is odd.

Similarly, subtracting, we conclude that y is even.

If y > 2, then, since w is odd, 5^{w} + 2^{y} 5 (mod 8.)

However, 3^{x} 1 or 3 (mod 8).

This is a contradiction; hence there is no solution with x > 0, y > 2.

If we assume y = 2, we have 5^{w} − 4 = 1.

Hence w = 1, and so z = 2.

Then we must have x = 2, and x = y = z = 2 is a solution.

If we assume y = 0, then we have 3^{x} + 1 = 5^{z}.

Considering this equation, mod 4, we obtain 3^{x} 0 (mod 4), which is impossible.

Hence the only solution with x > 0 is x = y = z = 2.

## Case x = 0

We have 1 + 4^{y} = 5^{z}.

Note that we must have z > 0, and so y 0.

By inspection, y = z = 1 is a solution.

Considering the equation, mod 3, we have 1 + 1 2^{z} (mod 3). Hence z is odd.

Considering the equation, mod 8, if y > 1, we have 1 5^{z} (mod 8). Hence z is even.

This is a contradiction; hence there is no solution with x = 0, y > 1.

We conclude that the only solution with x = 0 has y = z = 1.

## Case x < 0

Note that x < 0, y 0 z > 0, for which there is clearly no solution. So we must have x < 0 and y < 0, in which case z < 0.

We may let a = −x, b = −y, c = −z, so that a, b, c are positive, and we have 1/3^{a} + 1/4^{b} = 1/5^{c}.

Multiplying throughout by 3^{a}4^{b}5^{c}, we obtain 5^{c}(4^{b} + 3^{a}) = 3^{a}4^{b}.

This is impossible as the right-hand side contains no factor of 5.

We conclude that there is no solution with x < 0.

## Conclusion

The only integer solutions are (x, y, z) = (2, 2, 2) or (0, 1, 1).

## Further reading

- The Beal Conjecture
- Beal's Conjecture: A Search for Counterexamples

Source: Traditional

Back to top