What is the smallest n for which n! has more than 10 digits? I saw this exercise from the open sourced "Book of Proof", which I'm using in an abstract math class. I could only find out the answer by manually calculating different factorials. But I'm also curious if there is better method for it. Any hint and answers are appreciated!
 A: The number of digits of an integer $m$ is $\left\lfloor\log_{10}(m)\right\rfloor+1$. Hence, you're looking for the smallest $n$ for which
$$\left\lfloor\log_{10}(n!)\right\rfloor+1\geq 11$$
or $\left\lfloor\log_{10}(n!)\right\rfloor\geq10$. Now, because $\log(ab)=\log(a)+\log(b)$, we have that this is equivalent to finding the smallest natural $n$ for which
$$\left\lfloor\sum_{k=2}^n\log_{10}(k)\right\rfloor\geq 10$$
and since $\log_{10}(n!)$ will never be an integer (because $n!$ will never be a power of $10$), we might as well rewrite that as
$$\sum_{k=2}^n\log_{10}(k)>10$$
I'm not exactly sure how much better this is, but it's something I guess.
A: A way to reduce complexity is by keeping only n (say n=3) significant digits when doing your computations (since you only care about the number of digits). But honestly speaking, what question asks is not that much computationally complex anyway.
If you would have for example $10^{100}$ digits, than it may be useful to use a more or less refined Stirling approximation, depending on your needs.
