Well, this was good enough to answer Tim’s question, but he (rightly) took me to task for being so non-explanatory. So I spent some time looking at the problem, mainly by looking at the factorials from 1 to 100 and looking for patterns. Eventually I realized that it was the sum of how many times multiples of 5^1, 5^2, 5^3 … appeared. As a Lisp program:

I checked the wonderful On-Line Encyclopedia of Integer Sequences to see if this sequence appeared. At first, I couldn’t find it! Cool, I thought–I’ll have my own entry. Unfortunately for me, though, the sequence does appear, as sequence A027868 (I found this on a second search when I was looking to see if my entry had been accepted, Sorry to waste your time, N. J. A. Sloane). According to the MathWorld article on Factorial:

This is a special application of the general result first discovered by Legendre in 1808 that the largest power of a prime p dividing n! is … [formula omitted].

Nice to know I’m on the trailing edge of early 19th century number theory. I now promise myself a rest from Tim Converse and Joyce Park-related postings.

Interestingly, it’s a little difficult to search for 100! on both Yahoo Search and Google–and the Yahoo calculator doesn’t calculate factorial, and Google’s gives an approximation. But searching for “100 factorial is” on Yahoo and Google yields this page in Korean.

One Response to “A027868”

Heh. “Took me to task” is a bit strong — I was just prodding you (that’s different). But I was serious that that’s the way I’ll do “math” too, if I have a choice (though, sadly, I’ll probably reach for Perl first instead of Lisp these days).

Btw, your posting helps the case that I’m making to our HR department for “Michigan-centric” recruiting. There are just so many darn smart people in Michigan.