such that the decimal expansion of n ! ends with exactly 2020 zeros.
Find all positive integersAdd all values of together and input that number as your answer.
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.
Every zero at the end of n ! corresponds to a factor 5. (It is easy to see that there are always more factors 2 than 5 in n ! )
In the product n ! = 1 ⋅ 2 ⋅ 3 ⋯ 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 ⌊ 5 n ⌋ + ⌊ 2 5 n ⌋ + ⌊ 1 2 5 n ⌋ + ⋯ Ignoring the ⌊ ⋅ ⌋ , we find that the number of factors 5 is approximately (and no greater than) n ⋅ ( 5 1 + 2 5 1 + 1 2 5 1 + ⋯ ) = 4 n . If there are 2020 zeroes, and therefore 2020 factors 5, we expect n ≈ 4 ⋅ 2 0 2 0 = 8 0 8 0 . In fact, for 8080 we find that there are ⌊ 5 8 0 8 0 ⌋ + ⌊ 2 5 8 0 8 0 ⌋ + ⌊ 1 2 5 8 0 8 0 ⌋ + ⌊ 6 2 5 8 0 8 0 ⌋ + ⌊ 3 1 2 5 8 0 8 0 ⌋ = 1 6 1 6 + 3 2 3 + 6 4 + 1 2 + 2 = 2 0 1 7 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 are n = 8 0 9 5 , 8 0 9 6 , 8 0 9 7 , 8 0 9 8 , 8 0 9 9 . The sum is easily found as five times the middle value, ∑ n = 5 ⋅ 8 0 9 7 = 4 0 4 8 5 .