Fact of Factorials

Let f ( n ) : Z + Z f(n) : \mathbb{Z}^+ \to \mathbb{Z} be a function which gives the number of trailing zeros in n ! n! .

Then find,

lim n f ( n ) n \lim_{n\to \infty} \frac{f(n)}{n}

Details and Assumptions

  • For example, if n = 3 n=3 , then 3 ! = 6 3! = 6 , so f ( 3 ) = 0 f(3) = 0 ; if n = 7 n=7 , then 7 ! = 5040 7! = 5040 , so f ( 7 ) = 1 f(7) = 1
Image Credit: Wikimedia Factorial Interpolation


The answer is 0.25.

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

Rajath Naik
Mar 5, 2015

Here the function f(n) can be expanded as n/5 + n/5² +n/5³..........infinity..from the definition of trailing numbers. So when this summation is divided by n, the entire function is independent of n. And this function now becomes a GP summation expansion till infinity,with first term a=1/5 and common ratio r=1/5. .hence the infinite sum is 0.25

Note that the terms should be in the floor function, so it is not exactly equal to n 4 \frac{n}{4} . You will need to account for this error term, which is at most 4 log 5 n 4 \log_5 n and hence really small compared to n 4 \frac{n}{4} .

Calvin Lin Staff - 6 years, 3 months ago

Log in to reply

How did you get that error ?

Vishal Yadav - 4 years, 2 months ago

Log in to reply

Write it out.

k n 5 k n 5 k \sum_k \frac{ n } { 5^k } - \lfloor \frac{ n } { 5 ^ k } \rfloor \leq \ldots

Calvin Lin Staff - 4 years, 2 months ago

Log in to reply

@Calvin Lin You mean k n 5 k \floor n 5 k k n + 1 5 k \floor n + 1 5 k \sum_k\frac{n}{5^k} - \floor{\frac{n}{5^k}} \leq \sum_k\frac{n+1}{5^k} - \floor{\frac{n+1}{5^k}}\leq ...

What do I do with that ?

Vishal Yadav - 4 years, 2 months ago

Log in to reply

@Vishal Yadav Bound each term directly.

E.g. each term is less than 1, and there are at most log 5 n \log_5 n terms. Hence the error is at most log 5 n \log _ 5 n .

All we need is a crude bound.

Calvin Lin Staff - 4 years, 2 months ago

Log in to reply

@Calvin Lin Thanks. But I'm haven't learned enough to understand what it means...Will give a try after sometime..

Vishal Yadav - 4 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...