This question was in school maths challenge. I dont know how to approach this one.. any help would be appreciated.
Find $n$ if $n!$ ends in exactly $100$ zeroes and $n$ is divisible by $8$.
165 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
Ends in 100 zeros means that $5^{100}$ is a divisor. If $n \ge 5^im$ then $n > 2^im$ so if $5^{100}$ is a divisor so is $2^{100}$ so is $10^{100}$. so $5^{100}$ divisor is sufficient to end in 100 zeros.
To end in exactly 100 zeros means that in {1,2, ...., n} there are precisely 100 occurrences of 5 and added powers of 5. Let $5M \le n <= 5(M+1)$. There are M mulitiples of 5. 1/5 of those will be multiples of 25 and 1/25 will be multiples of 125 etc.
In total $5^m$ will yield $5^{m-1}$ multiples of 5, $5^{m-2}$ multiples of 25, etc. So $5^m!$ will have $5^{m-1} + 5^{m-2} + 5^{m - 3}+ ....$ zeros. So 125! will have 25 multiples of 5, 5 multiples of 25,, and 1 multiple of 125 so 125! ends with exactly 31 zeros.
So 375! will end with exactly 93 zeros. (As there are 75 multiples of 5, 15 multiples of 25, and 3 multiples of 125). We need 7 more zeros. that is 6 more multiples of 5 and one more multiple of 25. So 405! has exactly 100 zeros. (81 multiples of 5, 16 multiples of 25 and 3 multiples of 125).
So the $405 \le n < 410$. As 8|n. n = 408.
First, note that $n!$ will end in a number of zeroes equal to $\sum\limits_{i=1}^\infty \lfloor\frac{n}{5^i}\rfloor$
Alternatively, this could be written as $\sum\limits_{i=1}^n a_i$ where $a_i$ is the largest integer value such that $5^{a_i}\mid i$.
This can be seen by the fact that in the expansion of $n!$, each term divisible by $5$ will contribute a zero to the end with repitition considered for those numbers which are divisible by higher powers of $5$.
For example, $30!$ ends in $7$ zeroes.
In your specific question then, find an appropriate range of values of $n$ such that the number of zeroes at the end is $100$ and pick the value such that $n$ is furthermore divisible by $8$.
Interesting to note, not every number of zeroes at the end of $n!$ is possible. Below is the beginning of a chart:
$\begin{array}{|c|c|c|c|c|c|c}\hline \text{number of zeroes at end of}~n!&1&2&3&4&5&6&\dots&\\ \hline \text{range of}~n&5-9&10-14&15-19&20-24&none&25-29&\dots&\\ \hline\end{array}$
Skipping ahead, we have
$\begin{array}{|c|c|c|c|c|c|c}\hline \text{number of zeroes at end of}~n!&96&97&98&99&\dots&\\ \hline \text{range of}~n&390-394&395-399&none&400-404&\dots&\\ \hline\end{array}$