The number is so cute

N = 1 ! 2 ! 3 ! 4 ! 5 ! 2015 ! 2016 ! 2017 ! \large N = \color{#D61F06}{1!} \cdot \color{#EC7300}{2!} \cdot \color{#CEBB00}{3!} \cdot \color{#20A900}{4!} \cdot \color{#3D99F6}{5!} \cdots \color{magenta}{2015!} \cdot \color{#69047E}{2016!} \cdot \color{#333333}{2017!}

How many trailing number of zeros does N N have?


Notation: ! ! is the factorial notation. For example, 8 ! = 1 × 2 × 3 × × 8 8! = 1\times2\times3\times\cdots\times8 .


The answer is 504256.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Chew-Seong Cheong
May 14, 2017

As the number of trailing zeros of n ! n! is given by z n = k = 1 log 5 n n 5 k z_n = \displaystyle \sum_{k=1}^{\left \lfloor \log_5 n \right \rfloor} \left \lfloor \frac n{5^k} \right \rfloor , the number of trailing zeros of a product of factorials is the sum of z n z_n . Therefore, we have:

Z N = n = 1 2017 z n = n = 1 2017 k = 1 log 5 n n 5 k = n = 1 2017 ( n 5 + n 25 + n 125 + n 625 ) \begin{aligned} Z_N & = \sum_{n=1}^{2017} z_n \\ & = \sum_{n=1}^{2017} \sum_{k=1}^{\left \lfloor \log_5 n \right \rfloor} \left \lfloor \frac n{5^k} \right \rfloor \\ & = \sum_{n=1}^{2017} \left(\left \lfloor \frac n5 \right \rfloor + \left \lfloor \frac n{25} \right \rfloor + \left \lfloor \frac n{125} \right \rfloor + \left \lfloor \frac n{625} \right \rfloor \right) \end{aligned}

Evaluate the summations separately:

S 1 = n = 1 2017 n 5 = 1 5 + 2 5 + 3 5 + 4 5 + 5 5 + 6 5 + 7 5 + 8 5 + 9 5 + 10 5 + 11 5 + 12 5 + 13 5 + 14 5 + 15 5 + 16 5 + + 2012 5 + 2013 5 + 2014 5 + 2015 5 + 2016 5 + 2017 5 = 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 2 + 2 + 2 + 2 + 2 + 3 + 3 + + 402 + 402 + 402 + 403 + 403 + 403 = n = 1 2017 5 1 5 n + ( 2018 5 2017 5 ) 2017 5 = n = 1 402 5 n + ( 2018 2015 ) 403 = 5 ( 402 ) ( 403 2 + 3 ( 403 ) = 406224 \begin{aligned} S_1 & = \sum_{n=1}^{2017} \left \lfloor \frac n5 \right \rfloor \\ & = \left \lfloor \frac 15 \right \rfloor + \left \lfloor \frac 25 \right \rfloor + \left \lfloor \frac 35 \right \rfloor + \left \lfloor \frac 45 \right \rfloor + \left \lfloor \frac 55 \right \rfloor + \left \lfloor \frac 65 \right \rfloor + \left \lfloor \frac 75 \right \rfloor + \left \lfloor \frac 85 \right \rfloor + \left \lfloor \frac 95 \right \rfloor \\ & \quad + \left \lfloor \frac {10}5 \right \rfloor + \left \lfloor \frac {11}5 \right \rfloor + \left \lfloor \frac {12}5 \right \rfloor + \left \lfloor \frac {13}5 \right \rfloor + \left \lfloor \frac {14}5 \right \rfloor + \left \lfloor \frac {15}5 \right \rfloor + \left \lfloor \frac {16}5 \right \rfloor + \cdots \\ & \quad \cdots + \left \lfloor \frac {2012}5 \right \rfloor + \left \lfloor \frac {2013}5 \right \rfloor + \left \lfloor \frac {2014}5 \right \rfloor + \left \lfloor \frac {2015}5 \right \rfloor + \left \lfloor \frac {2016}5 \right \rfloor + \left \lfloor \frac {2017}5 \right \rfloor \\ & = 0+0+0+0+1+1+1+1+1 +2+2+2+2+2+3+3+\cdots+402+402+402+403+403+403 \\ & = \sum_{n=1}^{\left \lfloor \frac {2017}5 \right \rfloor -1} 5n +\left(2018 - 5\left \lfloor \frac {2017}5 \right \rfloor \right) \left \lfloor \frac {2017}5 \right \rfloor \\ & = \sum_{n=1}^{402} 5n + \left(2018 - 2015 \right)403 \\ & = \frac {5(402)(403}2 + 3(403) \\ & = 406224 \end{aligned}

Similarly,

S 2 = n = 1 2017 n 25 = 25 ( 79 ) ( 80 ) 2 + ( 2018 2000 ) 80 = 80440 S 3 = n = 1 2017 n 125 = 125 ( 15 ) ( 16 ) 2 + ( 2018 2000 ) 16 = 15288 S 4 = n = 1 2017 n 625 = 625 ( 2 ) ( 3 ) 2 + ( 2018 1875 ) 3 = 2304 \begin{aligned} S_2 & = \sum_{n=1}^{2017} \left \lfloor \frac n{25} \right \rfloor = \frac {25(79)(80)}2 + (2018-2000)80 = 80440 \\ S_3 & = \sum_{n=1}^{2017} \left \lfloor \frac n{125} \right \rfloor = \frac {125(15)(16)}2 + (2018-2000)16 = 15288 \\ S_4 & = \sum_{n=1}^{2017} \left \lfloor \frac n{625} \right \rfloor = \frac {625(2)(3)}2 + (2018-1875)3 = 2304 \end{aligned}

Z N = S 1 + S 2 + S 3 + S 4 = 406224 + 80440 + 15288 + 2304 = 504256 \implies Z_N = S_1 +S_2 + S_3+S_4 = 406224 + 80440 + 15288 + 2304 = \boxed{504256}

Thanks a lot.

mohan nayak - 4 years ago

Log in to reply

Why the thanks?

Chew-Seong Cheong - 4 years ago

Log in to reply

I was trying this problem but was not able to finish it. So I was very happy knowing that someone had given the solution.

mohan nayak - 4 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...