On 03/09/2016 19:25, Keith F. Lynch wrote: [...]
Tomas Rokicki <rokicki@gmail.com> wrote: [...]
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.
It's nice and quick and easy to compute the number of zeros on the end of a single factorial in base 10 or 16, yes. But the challenge is to count how many times equality occurs, and if you want e.g. to go from Tomas's 10^11 to 10^12 then you have 10^12 numbers to check, doing a bunch of divisions for each. If you have a way of doing that *quickly* then do by all means share it with us. Otherwise, I think accusing other people of rotted brains is premature. (In particular, if you are suggesting that T.R. got his counts by *actually computing the factorials* then I suggest you reconsider how plausible that is.) -- g