EighthGrader
- 11
- 0
Homework Statement
This is not a homework problem. I was just wondering the logic and intuition behind the "formula" for finding the number of zeros given the factorial of a number.
Homework Equations
Formula : round(n/5) + round(n/25) + round(n/125)+...+round(n/5^n)
Here, round function indicates that only the integer part of (n/5^n) should be taken.
Example1 : Say if you want to find the number of zero's in 5! ??
Usage : In this case n = 5.
-> round(5/5) + round(5/25)+...
->round(1) + round(0)
-> 1 (1 zero in 5!)
Example2 : find the number of zero's in 130! ??
Usage : In this case n = 130.
-> round(130/5) + round(130/25) + round(130/125) ...
->round(26) + round(5) + round(1)
-> 32 (32 zeroes in 130!)
Thanks!