# The asymptotic behaviour of $\sum_{1\leq k\leq N-1}\int_{p_k}^{p_{k+1}}\log x d[x]$, where $p_n$ is the nth prime number

Let $p_k$ is the kth prime number and consider for $N\geq 2$ the arithmetic function $$f(N)=\sum_{k=1}^{N-1}\int_{p_k}^{p_{k+1}}\log(x) d[x]$$ where $[x]$ is the integer part function (provide us in your answer the definition of the function [x]). Then I believe that it could be a nice exercise

Question. a) Compute the asymptotic behaviour of $f(N)$ as $N\to \infty$ as an asymptotic equivalence $$f(N)\sim \text{something}.$$ b) Evaluate $$\lim_{N\to\infty}f(N+1)-f(N).$$

I did this exercise yesterday, computing unconditionally (it is without assumption of additional hypothesis or conjectures) with well-knonw asymptotics. Can your repeat the computations to see if my aproach was right? Many thanks.

We have, using integration by parts of the Riemann–Stieltjes integral, $$\int_{p_{k}}^{p_{k+1}}\log\left(x\right)d\left[x\right]=p_{k+1}\log\left(p_{k+1}\right)-p_{k}\log\left(p_{k}\right)-\int_{p_{k}}^{p_{k+1}}\frac{\left[x\right]}{x}dx$$ and so we can see that $$\sum_{k=1}^{N-1}\left(p_{k+1}\log\left(p_{k+1}\right)-p_{k}\log\left(p_{k}\right)\right)=p_{N}\log\left(p_{N}\right)-2\log\left(2\right).$$ Now let us focus on the integral. Since $\left[x\right]=x+O\left(1\right)$ we have $$\int_{p_{k}}^{p_{k+1}}\frac{\left[x\right]}{x}dx=p_{k+1}-p_{k}+O\left(\log\left(p_{k+1}\right)\right)$$ and, since from the PNT we know that $\sum_{p\leq x}\log\left(p\right)\sim x$ we have $$\sum_{k=1}^{N-1}\int_{p_{k}}^{p_{k+1}}\frac{\left[x\right]}{x}dx=p_{N}-2+O\left(\sum_{k=1}^{N-1}\log\left(p_{k+1}\right)\right)=O\left(p_{N}\right)$$ hence $$f\left(N\right)=p_{N}\log\left(p_{N}\right)+O\left(p_{N}\right)\sim N\log^{2}\left(N\right)+O\left(N\log\left(N\right)\right).$$ About the limit, since $t-1\leq\left[t\right]\leq t$ we can observe that $$p_{k+1}-p_{k}-\log\left(p_{k+1}\right)+\log\left(p_{k}\right)\leq\int_{p_{k}}^{p_{k+1}}\frac{\left[t\right]}{t}dt\leq p_{k+1}-p_{k}$$ hence $$p_{N}\log\left(p_{N}\right)-2\log\left(2\right)-p_{N}+2\leq f\left(N\right)\leq p_{N}\log\left(p_{N}\right)-2\log\left(2\right)-p_{N}+2+\log\left(\frac{p_{N}}{2}\right)$$ and using the bounds $$\log\left(N\right)+\log\left(\log\left(N\right)\right)-1\leq\frac{p_{N}}{N}\leq\log\left(N\right)+\log\left(\log\left(N\right)\right),\, N\geq6$$ we can see that $$\lim_{N\rightarrow\infty}f\left(N+1\right)-f\left(N\right)=\infty.$$
• Very thanks much, my calculations were wrong, it is the motivation for the second question (that was, there were mistakes in my calculations when I've proposed this exercise). In any case, is a very nice exercise, of course by your answer: that is a refresh of Riemann-Sieltjes, the PNT, how integrate $\int_a^b\frac{\left[t\right]}{t}dt$, and the asymptotics and bounds that you've used. Thus congratullations for this nice answer, and thanks.