This question was in school maths challenge. I dont know how to approach this one.. any help would be appreciated.
-
Hint: the number of zeros at the end of a number is exactly the number of times that $10$ divides the number. – Marcus M Nov 08 '15 at 16:59
2 Answers
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}$
We see then that the range $405-409$ gives $100$ zeroes at the end of $n!$. The only $n$ of which that is divisible by $8$ is $408$.
- 79,518
-
Thank you . But would you mind explaining the notation in the first line. I am not aware of that notation... that looks like a (floor of) .... and would you mind giving me a hint how to approach this algebraically as well. Thank you. – Abu Bardewa Nov 08 '15 at 17:43
-
1@Abu the notation $\sum\limits_{i=1}^\infty \lfloor \frac{n}{5^i}\rfloor$ is the summation of the floor of our number $n$ divided by $5$ to the $i$'th power ranging from $i=1$ to $\infty$. For example, the number $130!$ ends in $\lfloor\frac{130}{5}\rfloor+\lfloor\frac{130}{25}\rfloor+\lfloor\frac{130}{125}\rfloor+\lfloor\frac{130}{625}\rfloor+\dots = 26+5+1+0\dots=32$ zeroes. – JMoravitz Nov 08 '15 at 17:56
-
1@Abu the first notation is easier to use if starting at an arbitrary number, whereas the second notation is easier for me to use if approaching recursively. Since $130!$ ends in $32$ zeroes, I know that $135!$ ends in $33$ zeroes, that $140!$ ends in $34$ zeroes, that $145!$ ends in $35$ zeroes, and that $150!$ ends in $37$ zeroes. – JMoravitz Nov 08 '15 at 17:57
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.
- 124,253
-
1Arithmetic is still off. I recommend reading my answer above. Check your understanding and method to see how many zeroes something small has, such as $6!$ and $11!$. I think you are off by one in your calculations somewhere. – JMoravitz Nov 08 '15 at 18:06
-
1I forgot to count 75 itself as a multiple of 25. I only counted 25 and 50 for 2. Should have been 3. – fleablood Nov 08 '15 at 18:23
-