4. Solve the equation $3^{x}+4^{y}=5^{z}$ in natural numbers.
4. The right side of the equation, when divided by 3, should give the same remainder as the left side, i.e., 1 (see fact 7). Therefore, \( z \) is an even number (see comment). Similarly, the left side of the equation, when divided by 4, gives a remainder of 1, so the number \( x \) is also even. Thus, \( 4^{y} = 5^{z} - 3^{x} = 5^{2z_{0}} - 3^{2x_{0}} \), i.e., \( 2^{2y} = (5^{z_{0}} - 3^{x_{0}})(5^{z_{0}} + 3^{x_{0}}) \). Therefore, \( 5^{z_{0}} - 3^{x_{0}} = 2^{k} \) and \( 5^{z_{0}} + 3^{x_{0}} = 2^{l} \) (see fact 10), where \( k \) and \( l \) are non-negative integers and \( k + l = 2y \). Thus, \( 5^{z_{0}} = \frac{1}{2}(2^{k} + 2^{l}) \) and

\[
3^{x_{0}} = \frac{1}{2}(2^{l} - 2^{k}) = 2^{l-1} - 2^{k-1}
\]

This means that the number \( 2^{l-1} - 2^{k-1} \) is odd, so \( k = 1 \). Therefore, \( 2^{k} = 2 \) and \( 3^{x_{0}} = 2^{l-1} - 1 \). Consequently, the number \( l-1 \) is even, \( l-1 = 2s \) (otherwise, the left side is not divisible by 3). Then \( 3^{x_{0}} = (2^{s} - 1)(2^{s} + 1) \) — the product of two factors differing by 2 and being powers of three. Clearly, these factors are 1 and 3. Then \( s = 1, l = 2s + 1 = 3 \). Now it is easy to see that \( x = y = z = 2 \).

Comment. It is not difficult to prove by induction that the remainder of the division of \( 5^{z} \) by 3 is 1 if \( z \) is even, and 2 if \( z \) is odd.

In fact, the remainders of the division of \( a^{n} \) by \( b \) (for fixed \( a \) and \( b \)) form a periodic sequence (fact 4). This can be derived from the last statement of fact 7.

Note also that if \( b \) is a prime number, then the period of this sequence is a divisor of the number \( p-1 \). This statement is equivalent to Fermat's Little Theorem, see the comment to problem 6 for 11th grade of the 1995 Olympiad.