Think! 2

Find all positive integers n n such that the decimal expansion of n ! ends with exactly 2020 zeros.

Add all values of n n together and input that number as your answer.


The answer is 40485.

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

Arjen Vreugdenhil
Oct 30, 2015

Every zero at the end of n ! n! corresponds to a factor 5. (It is easy to see that there are always more factors 2 than 5 in n ! n! )

In the product n ! = 1 2 3 n n! = 1\cdot 2\cdot 3 \cdots n , every fifth number contributes a factor 5; every twenty-fifth number contributes an additional factor 5; and so on. Therefore the number of factors 5 is n 5 + n 25 + n 125 + \left\lfloor \frac n 5\right\rfloor + \left\lfloor \frac n {25}\right\rfloor + \left\lfloor \frac n {125}\right\rfloor + \cdots Ignoring the \lfloor\cdot\rfloor , we find that the number of factors 5 is approximately (and no greater than) n ( 1 5 + 1 25 + 1 125 + ) = n 4 . n\cdot \left(\frac15 + \frac1{25} + \frac1{125} + \cdots\right) = \frac n 4. If there are 2020 zeroes, and therefore 2020 factors 5, we expect n 4 2020 = 8080. n \approx 4\cdot 2020 = 8080. In fact, for 8080 we find that there are 8080 5 + 8080 25 + 8080 125 + 8080 625 + 8080 3125 = 1616 + 323 + 64 + 12 + 2 = 2017 \left\lfloor \frac {8080}5\right\rfloor + \left\lfloor \frac {8080}{25}\right\rfloor + \left\lfloor \frac {8080}{125}\right\rfloor + \left\lfloor \frac {8080}{625}\right\rfloor + \left\lfloor \frac {8080}{3125}\right\rfloor = 1616 + 323 + 64 + 12 + 2 = 2017 factors 5. The remaining three factors 5 come from 8085, 8090, and 8095.

Since the next factor 5 is found at 8100, the required values of n n are n = 8095 , 8096 , 8097 , 8098 , 8099. n = 8095, 8096, 8097, 8098, 8099. The sum is easily found as five times the middle value, n = 5 8097 = 40485 . \sum n = 5\cdot 8097 = \boxed{40485}.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...