Bill Gosper <billgosper@gmail.com> wrote:
Despite my distaste for decimal digits, I noticed (while showing Mathematica to new user Miles) that 52! ends in twelve 0s both in decimal and hex. Equality happens ... with gradually declining frequency:
Tomas Rokicki <rokicki@gmail.com> wrote:
Maybe it's finite, maybe it's not. Asymptotically of course the count of zeros in both decimal and hex in n! are n/4; surprising that.
I could only get to 10^11 quickly: ....
Overuse of Mathematica rots the brain. If you want an exact count, the number of 0-digits at the end of n! is sum(floor(n/5^j)) for decimal, and floor(sum(floor(n/2^j))/4) for hexadecimal. In both cases j ranges over all positive integers. Using those formulas, it should be easy to get way past 10^11. "How many zero-digits does one thousand factorial end with" is a fun problem to give to people to solve in their head.