# Asymptotic formula/closed form for $\sum_{n=1}^{x}\frac{1}{\log n}$

I was trying to get an asymptotic formula for the sum $$\sum_{n=2}^{x}\frac{1}{\log n}$$ this looks a bit tricky, but I still tried it. We have

\begin{align} \sum_{n=2}^{x}\frac{1}{\log n}&=-\sum_{n=2}^{x}\frac{1}{\log(nt)}\Bigg{|}_{t=1}^{t=\infty}\\ &=\sum_{n=2}^{x}\int_{1}^{\infty}\frac1{t\log^2(nt)}dt \end{align} Now I don't know what to do further. Any help would be appreciated. Any asymptotic formula or closed form would help.
Note: I will probably update this question to post more of my work.
Update: I proved that this sum is $$O(x/\log x)$$, and this was also mentioned in the comments. But I want to improve this. How can one improve the error term?

Note that $$\sum\limits_{n = 2}^x {\frac{1}{{\log n}}} \le \frac{1}{{\log 2}} + \sum\limits_{n = 3}^x {\int_{n - 1}^n {\frac{{dt}}{{\log t}}} } = \frac{1}{{\log 2}} + \int_2^x {\frac{{dt}}{{\log t}}}$$ and $$\sum\limits_{n = 2}^x {\frac{1}{{\log n}}} \ge \sum\limits_{n = 2}^x {\int_n^{n + 1} {\frac{{dt}}{{\log t}}} } \ge \sum\limits_{n = 2}^{x - 1} {\int_n^{n + 1} {\frac{{dt}}{{\log t}}} } = \int_2^x {\frac{{dt}}{{\log t}}} .$$ Thus, by the known asymptotic expansion of the logarithmic integral, $$\sum\limits_{n = 2}^x {\frac{1}{{\log n}}} = \int_2^x {\frac{{dt}}{{\log t}}} + \mathcal{O}(1) \sim \frac{x}{{\log x}}\left( {1 + \frac{{1!}}{{\log x}} + \frac{{2!}}{{\log ^2 x}} + \cdots } \right)$$ as $$x\to +\infty$$.

• And $\lim_{x\to \infty} Li(x)-\sum_{n=1}^x 1/\log n= \sum_n O(\frac{1}{n\log^2 n})$ converges – reuns Dec 19 '20 at 9:23

By Riemann-Stieltjes integration we have

\begin{aligned} \sum_{2\le n\le x}{1\over\log n} &=\sum_{2

in which

$$A={1\over\log2}-\int_2^\infty{\{t\}\over t\log^2t}\mathrm dt$$

and $$\operatorname{Li}(x)=\operatorname{li}(x)-\operatorname{li}(2)$$ is the logarithmic integral function satisfying

$$\operatorname{Li}(x)\sim{x\over\log x}$$