Tessellate S.T.E.M.S. (2019) - Computer Science - School - Set 1 - Objective Problem 2

The number of natural numbers whose factorial ends with exactly 2019 2019 zeroes are:


This problem is a part of Tessellate S.T.E.M.S (2019)

6 6 4 4 0 0 5 5

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

Brian Moehring
Oct 15, 2018

For any natural number N , N, let f ( N ) f(N) denote the number of trailing zeroes of N ! . N!\text{.} Then we can use the known formula f ( N ) = k = 1 N 5 k f(N) = \sum_{k=1}^\infty \left\lfloor \frac{N}{5^k} \right\rfloor which directly implies f ( N ) < k = 1 N 5 k = N 4 f(N) < \sum_{k=1}^\infty \frac{N}{5^k} = \frac{N}{4} and can be used to show f ( N ) N 4 log 5 N 1. f(N) \geq \frac{N}{4} - \log_5N - 1. Then setting f ( N ) = 2019 f(N) = 2019 and solving N N yields 8076 < N 8102 8076 < N \leq 8102

Additionally, for any positive integer k , k, f ( 5 k 1 ) < f ( 5 k ) = f ( 5 k + 1 ) = f ( 5 k + 2 ) = f ( 5 k + 3 ) = f ( 5 k + 4 ) < f ( 5 k + 5 ) f(5k-1) < f(5k) = f(5k+1) = f(5k+2) = f(5k+3) = f(5k+4) < f(5k+5) which means we only need to test integers N N which are multiples of five, so we only need to test N { 8080 , 8085 , 8090 , 8095 } N \in \{8080, 8085, 8090, 8095\}

In particular, we can see that f ( 8090 ) = f ( 8091 ) = f ( 8092 ) = f ( 8093 ) = f ( 8094 ) = 2019 f(8090) = f(8091) = f(8092) = f(8093) = f(8094) = 2019 and N < 8090 f ( N ) < 2019 N > 8094 f ( N ) > 2019 N < 8090 \implies f(N) < 2019 \\ N > 8094 \implies f(N) > 2019 so that exactly 5 \boxed{5} natural numbers have factorials with 2019 2019 trailing zeroes.

For anyone interested, the particular inequality I gave for N N is more generally given as 4 f ( N ) < N 4 ln 5 W 1 ( ln 5 20 5 f ( N ) ) 4\cdot f(N) < N \leq \left\lfloor -\frac{4}{\ln 5} W_{-1}\left(-\frac{\ln 5}{20}\cdot 5^{-f(N)}\right) \right\rfloor where W 1 W_{-1} denotes the negative branch of the Lambert W such that W 1 ( x ) 1 W_{-1}(x) \leq -1 for 1 e x < 0 -\frac{1}{e} \leq x < 0

Brian Moehring - 2 years, 7 months ago

That's correct ! Good job !

Tessellate STEMS Computer Science - 2 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...