Is there a way to find all the $0$s in $100!$? (Including zeroes that come between two non-zero numbers)

I know that to find the $0$s at the end we can use the greatest integer method. I was just curious if a method exists to find the remaining zeroes, too. (Of course without finding the actual value of $100!$ and counting, as is done in the only answer to this previous question: How many zeroes are in 100!.)

  • 3
    $\begingroup$ The duplicate did not answer the question....... $\endgroup$ – user99914 Apr 19 '15 at 8:40
  • 2
    $\begingroup$ What John said. The other similar question did not get a proper answer. I'm not sure how this should be handled though. $\endgroup$ – DRF Apr 19 '15 at 8:52
  • 1
    $\begingroup$ There was no need to post a new question, as this ask exactly the same as the old one! $\endgroup$ – Mariano Suárez-Álvarez Apr 19 '15 at 9:49
  • $\begingroup$ What does finding all zeroes mean. Do you mean finding number of them and also positions? $\endgroup$ – Martin Sleziak Feb 22 '16 at 14:07
  • $\begingroup$ Related post: Number of zero digits in factorials $\endgroup$ – Martin Sleziak Feb 22 '16 at 14:07

One way is to compute it!

In[2]:= Count[IntegerDigits[100!], 0]
Out[2]= 30

This computation took 0.000033 seconds in Mathematica.

  • $\begingroup$ (I seriously doubt there is a better way) $\endgroup$ – Mariano Suárez-Álvarez Apr 19 '15 at 9:39
  • $\begingroup$ The sequence $2, 30, 472, 5803, 68620, 782336, \dots$ is the number of zero digits in $10^k!$ starting from $k=1$. This is not in the OEIS (yet?). The next one, $10^7!$, has something like $1.5\times 10^8$ digits, and probably one needs to do something smarter than my trivial code above to compute the number of zeroes. $\endgroup$ – Mariano Suárez-Álvarez Apr 19 '15 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.