# The number of digits in n! (Part 1)

When I was in school, perhaps my favorite pet project was trying to find a formula for the number of digits in $n!$. For starters:

• $0! = 1$: 1 digit
• $1! = 1$: 1 digit
• $2! = 2$: 1 digit
• $3! = 6$: 1 digit
• $4! = 24$: 2 digits
• $5! = 120$: 3 digits
• $6! =720$: 3 digits
• $7! = 5040$: 4 digits
• $8! = 40,320$: 5 digits

I owned what was then a top-of-the-line scientific calculator (with approximately the same computational capability as a modern TI-30), and I distinctly remember making a graph like the following on graph paper. The above calculations contribute the points $(0,1)$, $(1,1)$, $(2,1)$, $(3,1)$, $(4,2)$, $(5,3)$, $(6,3)$, $(7,4)$, and $(8,5)$.

I had to stop (or, more accurately, I thought I had to stop) at $69!$ because my calculator couldn’t handle numbers larger than $10^{100}$.

I stared at this graph for weeks, if not months, trying to figure out an equation that would fit these points. And I never could figure it out.

And, to this day, I’m somewhat annoyed at my adolescent self that I wasn’t able to figure out this puzzle for myself… since I had all the tools in my possession needed to solve the puzzle, though I didn’t know how to use the tools.

In this series of posts, I’ll answer this question with the clever application of some concepts from calculus and precalculus.