Find all solutions of 3x + 4y = 5z, for integers x, y, and z.
We will consider three separate cases: x > 0, x = 0, x < 0.
First of all, we note that x > 0 z > 0, and then y 0.
Considering 3x + 4y = 5z, modulo 3, we obtain 1 (−1)z (mod 3.)
Hence z is even.
Letting z = 2w, we may write 3x as a difference of two squares:
3x = 52w − 4y = (5w + 2y)(5w − 2y)
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 5w + 2y = 3x and 5w − 2y = 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, 5w + 2y 5 (mod 8.)
However, 3x 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 5w − 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 3x + 1 = 5z.
Considering this equation, mod 4, we obtain 3x 0 (mod 4), which is impossible.
Hence the only solution with x > 0 is x = y = z = 2.
We have 1 + 4y = 5z.
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 2z (mod 3). Hence z is odd.
Considering the equation, mod 8, if y > 1, we have 1 5z (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.
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/3a + 1/4b = 1/5c.
Multiplying throughout by 3a4b5c, we obtain 5c(4b + 3a) = 3a4b.
This is impossible as the right-hand side contains no factor of 5.
We conclude that there is no solution with x < 0.
The only integer solutions are (x, y, z) = (2, 2, 2) or (0, 1, 1).