# Estimate how much large is $\lfloor \log{n!\rfloor}$ [duplicate]

Is there a simple method to find or estimate how large $$\lfloor \lg{n!\rfloor}$$ is ? I'd like to find (or estimate) how much digits $$2017!^{2017}$$ has, or how much is big that number .

I tried for some little number and general form of $$n!^{n}=\overline{a_k...a_4a_3a_2a_1} \\ k=?$$ so I took logarithm of $$n!^{n} \mapsto n\log(n!)$$.

It is easy when $$n$$ is little number , but when go for a large number ...what we can do ? My question can be translate as $$n\sum_{i=1}^{n}\log(i)= ?$$

## marked as duplicate by Jack D'Aurizio calculus StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Nov 10 '17 at 21:39

• I cannot believe you have never met Stirling's inequality in your whole mathematical career, @Khosrotash. – Jack D'Aurizio Nov 10 '17 at 21:40
• @JackD'Aurizio : of course I saw it , but maybe I forgot it or forgot the apllication! thanks again. – Khosrotash Nov 11 '17 at 4:20

Stirling's approximation says that $$n!\approx \sqrt{2\pi n}\left(\frac ne\right)^n$$ Taking logarithms on both sides should be easy enough.

$\lfloor \ln(n!)\rfloor=\sum_{k=2}^n\ln(k) + O(1)$. Since $\int_{k-1}^{k}\ln(t) dt\leq \ln(k)\leq \int_{k}^{k+1}\ln(t) dt$,

$$\int_1^n \ln(t)dt\leq \sum_{k=2}^n\ln(k) \leq \int_2^{n+1}\ln(t)dt$$

Since $\int \ln(x) dx = x\ln(x)-x$ and $\ln(n+1)\sim\ln n$, $$\sum_{k=2}^n\ln(k) = n\ln(n)+o(n\ln n)$$ hence $\lfloor \ln(n!)\rfloor=n\ln(n)+o(n\ln n)$.

However, this is only a partial answer as you need a more precise estimate for your problem.

• :$$\lfloor \ln(n!)\rfloor=n\ln(n)+o(n\ln n)$$ or $$\lfloor \ln(n!)\rfloor=n\ln(n)+o(\ln n)$$ ? – Khosrotash Sep 16 '17 at 8:17
• No, with my computations $\lfloor \ln(n!)\rfloor=n\ln(n)+o(n\ln n)$. With further work, you can prove $\lfloor \ln(n!)\rfloor=n\ln(n)-n+O(\ln n)$. The equality $\lfloor \ln(n!)\rfloor=n\ln(n)+o(\ln n)$ is not true. – Gabriel Romon Sep 16 '17 at 8:19
• :First thanks for idea .second: It doesn't make a sense when you say $$x+o(x)$$! – Khosrotash Sep 16 '17 at 8:20
• @Khosrotash $u_n\sim v_n \iff u_n=v_n+o(v_n)$. – Gabriel Romon Sep 16 '17 at 8:22