How many zeros does the number $4^{5^{6}}+6^{5^{4}}$ end with in its decimal representation?
Solution. Let $N=4^{5^{6}}+6^{5^{4}}$. Our goal is to express $N$ in the form $N=2^{a} \cdot 5^{b} \cdot c$, where $c$ is not divisible by 5 or 2. Then $N$ will end in as many zeros as the minimum of $a$ and $b$, since 10 can be factored out of it that many times. We will solve the problem in two steps.

1. We show that the value of $a$ is 625:

$$
N=4^{5^{6}}+6^{5^{4}}=2^{5^{6}} \cdot 2^{5^{6}}+2^{5^{4}} \cdot 3^{5^{4}}=2^{31250}+2^{625} \cdot 3^{625}=2^{625} \cdot\left(2^{30625}+3^{625}\right)
$$

Here, the second factor is the sum of an even and an odd number, which is odd, so the exponent of 2 in the prime factorization of $N$ is 625.

2. We show that the value of $b$ is 5:

$$
N=4^{5^{6}}+6^{5^{4}}=(5-1)^{5^{6}}+(5+1)^{5^{4}}
$$

When we expand these two powers, only one term in each will not be divisible by 5, namely $(-1)^{5^{6}}=-1$ and $1^{5^{4}}=1$, which cancel each other out. Let's look at the other terms, specifically how the power of 5 appears in them.

First, consider the expansion of the first power. Ignoring the sign from now on, as it is not important for divisibility by 5, terms of the form $5^{n} \cdot\binom{15625}{n}$ appear.

For $n=0$, we have already canceled it out. For $n>5$, clearly $5^{6}$ can be factored out of each term.

For $n=5$:

$$
\binom{15625}{n}=\frac{15625 \cdot 15624 \cdot 15623 \cdot 15622 \cdot 15621}{1 \cdot 2 \cdot 3 \cdot 4 \cdot 5}
$$

In the numerator, $5^{6}$ appears, and in the denominator, $5^{1}$, so the highest power of 5 in this fraction is $5^{5}$. Multiplying this by $5^{5}$, the exponent of 5 for $n=5$ is 10. For $n>5$, $5^{6}$ clearly appears in every term.

For $n=5$:

$$
\binom{625}{n}=\frac{625 \cdot 624 \cdot 623 \cdot 622 \cdot 621}{1 \cdot 2 \cdot 3 \cdot 4 \cdot 5}
$$

In the numerator, $5^{4}$ appears, and in the denominator, $5^{1}$, so the highest power of 5 in this fraction is $5^{3}$. Multiplying this by $5^{5}$, the exponent of 5 for $n=5$ is 8. For $0<n<5$, $5^{0}$ appears in the denominator of $\binom{625}{n}$, and $5^{4}$ in the numerator, so the binomial coefficient contains $5^{4}$. Multiplying this by $5^{n}$, where $n \geq 2$, the exponent of 5 in these terms is at least 6.

For $n=1$:

$$
5 \cdot\binom{625}{1}=3125=5^{5}
$$

so this is the only term where the exponent of 5 is less than 6, specifically 5. $N$ is the sum of such numbers, so $5^{5}$ can be factored out of it, and the remaining factor will be divisible by 5 in every term except one, so another factor of 5 cannot be factored out. Therefore, the exponent of 5 in the prime factorization of $N$ is indeed 5.

Since $N$ ends in as many zeros as the minimum of $a=625$ and $b=5$, $N$ ends in five zeros.