asymptotic formula for $\sum_{n≦x}\log(n)$

66 Views Asked by At

I want to show that $$ \sum_{n≦x}\log(n)=x\log(x)-x+\mathcal{O}(\log(x)).$$ Is it possible to write $\sum_{n≦x}\log(n)\leq \int_{1}^{x+1} \log(t) dt=\int_{1}^x \log(t)dt + \int_{x}^{x+1} \log(t)dt\\ =x\log(x)-x+1+\int_{x}^{x+1} \log(t)dt≦x\log(x)-x+1+\log(x+1)$

in order to say

$$\sum_{n≦x}\log(n)-x\log(x)+x=\mathcal{O}(\log(x)).$$

2

There are 2 best solutions below

2
On BEST ANSWER

$$\sum_{k=1}^x\ln(k)=\ln(x!)$$

Use Stirling's formula:

$$\ln(x!)\sim \ln\left(\sqrt{2\pi x}\left(\frac{x}{e}\right)^x\right)=\ln(\sqrt{2\pi})+\frac{1}{2}\ln(x)+x\ln(x)-x$$

Therefore:

$$\sum_{k=1}^x\ln(k)-x\ln(x)+x\sim\frac{1}{2}\ln(x)+\ln(\sqrt{2\pi})=O(\ln(x))$$

1
On

No, this just establishes one half of the bound. To say that $\sum_{n\leq x}\log n = x\log x-x+O(\log x)$ means that there is a constant $C>0$ such that, for all large $x$,

$$\lvert \sum_{n\leq x}\log n-x\log x+x\rvert \leq C\log x.$$

This implies not only an upper bound on $\sum_{n\leq x}\log n$ (as you prove) but also a lower bound, showing that it can't be too much smaller than $x\log x-x$. This can be established by a very similar integral-based proof as the one you give.