41
$\begingroup$

One common math puzzle I've seen around asks for how many zeros are in the product of "100!"

Usually, the solution everyone gives goes something like try to match pairs of 5s and 2s that factor out of the numbers, which ends up being 24 zeroes (you can factor a 5 out of 20 of the numbers, and factor 2 5s out of 4 of the numbers; you can factor more than 24 2s out).

This however as far as I know gives the number of trailing zeroes at the end of the number, but does not account for the zeroes that are within the number. My question is, is this answer correct anyways? Can there be zeroes that aren't trailing that are inside? Why or why not and if there can be can we somehow figure out how many are within the product?

Thanks

  • 0
    http://www.wolframalpha.com/input/?i=100+factorial There are zeros other than the trailing zeroes at the end of the number.2012-05-07
  • 0
    I think it's a much much harder problem.2012-05-07
  • 17
    I am not aware of any way to predict the number of non-trailing zeros in $n!$, other than by calculating n! and counting them.2012-05-07
  • 1
    See also https://oeis.org/A1375812012-05-07
  • 1
    According to WolframAlpha it would be $29$ zeros in $100!$ (trailing $24$ and $5$ zeroes inside), but if you are looking for a method, as Robert Israel said, there is no known method.2012-05-07
  • 4
    I would expect that for large $n$ about one-tenth of the digits should be zero, simply because there's no good reason to expect otherwise. The number of digits of $n!$ can be estimated very well by Stirling's formula.2012-07-07
  • 0
    The answer is given by this sequence: https://oeis.org/A027869 (contains no elementary formula)2012-07-07
  • 0
    @GerryMyerson: There are $158$ digits in $100!$, and accounting for the lead digit, the $24$ trailing zeroes, and the digit prior to the trailing zeros, there are $132$ digits that *could* be zero. As you say, one would expect about $13$ or so zeros, but in actuality, there are only $6$.2012-07-07
  • 1
    @robjohn, 100 is not large.2012-07-07
  • 0
    @GerryMyerson: True. However, the expected mean is $\mu=13.2$ with a variance of $\sigma^2=11.88$. $6$ is a bit over $2\sigma$ below mean, with a probability of less that $2$%. It seemed a bit significant to me; perhaps I am just easily impressed :-)2012-07-07
  • 1
    @robjohn,if it has a probability of less than 2 percent, that means you'd expect to see it happen if you looked at, say, all the $n!$ with $50\le n\le150$. I refuse to be impressed by a single data point. Show me a trend.2012-07-08
  • 1
    See also [Number of zero digits in factorials](http://math.stackexchange.com/questions/286947/number-of-zero-digits-in-factorials)2016-02-22
  • 0
    Related: https://math.stackexchange.com/questions/1411962018-11-29

2 Answers 2