Thursday, 30 August 2018

Number of zeros at the end of $k!$





For how many positive integer $k$ does the ordinary decimal representation of the integer $k\text { ! }$ end in exactly $99$ zeros ?




By inspection I found that $400\text{ !}$ end in exactly $99$ zeros , but $399\text{ !}$ does NOT end in $99$ zeros ; using the formula $$\text{ number of zeros at the end }=\sum_{n=1}^{\infty}\left[\frac{k}{5^n}\right]$$where , $[x]$ denotes the greatest integer part not exceeding $x$.



I also found that, for $k=401,402,403,404$ the number of zeros is same, but for $k=405$ the number of zeros increase by $1$ ; as $405$ is divisible by $5$ again , after $400$.



Thus I got that there are only $5$ integers satisfying the condition which are $400,401,402,403,404$.




The question is possible duplicate of this or this but my question is different from these two questions.




Does there exist any other rule or easy formula from where I can get how many integers are there



Answer



Because the number of zeroes steps up at each multiple of $5$, the only possible answers are five or zero. So the question might be: How to determine of there exists $k$ such that $k!$ ends in a given number of zeroes?



Say we want $m$ zeroes. So we look for $k$ with
$$ m=f(k):=\sum_{i=1}^\infty\left\lfloor \frac k{5^i}\right \rfloor$$

First note that
$$ \tag1f(k)<\sum_{i=1}^\infty\frac k{5^i}=\frac k4$$
and on the other side
$$ \tag2f(k)\ge \sum_{i=1}^{\lfloor \log_5k\rfloor}\left( \frac k{5^i}-1\right )> \frac k4-\lfloor \log_5k\rfloor-\frac 54>\frac k4-\log_5k-\frac 94$$
For $k\ge 3$, the right hand side of $(3)$ is strictly increasing. Therefore we start our search at $k=4m+1$ and end it no later than $k=4m+4\log_5(4m+1)+9$. Unless $m$ is awfully large, this requires us to try just a few values of $k$ (recall that we only need to try multiples of $5$).


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...