My problem is to show that $$ \sum_{p\leq \sqrt x}\frac{x}{p\log(x/p)}=x\int_{2}^{\sqrt{x}}\frac{1}{u\log(x/u)\log u}\,\mathrm{d}u+O(x/\log x) $$ using Abel's summation formula and PNT. It is understood that $p$ is prime here. Letting $\phi(n)=\frac{x}{n\log(x/n)}$, we have $$ \sum_{p\leq \sqrt x}\frac{x}{p\log(x/p)}=\pi(\sqrt x)\phi(\sqrt x)-\int_{2}^{\sqrt{x}}\pi(t)\phi'(t)\,\mathrm{d}t, $$ but determining $\phi'(t)$, the integral becomes too big.


2 Answers 2


It's not super nice, but it's not so bad, actually. Write $\phi(t) = \psi_1(t)\cdot \psi_2(t)$ with

$$\psi_1(t) = \frac{x}{t}\quad\text{and}\quad \psi_2(t) = \frac{1}{\log (x/t)} = \frac{1}{\log x - \log t}.$$

Then we have

$$\psi_1'(t) = - \frac{x}{t^2}\quad\text{and}\quad \psi_2'(t) = -\frac{1}{(\log x - \log t)^2}\cdot \biggl(-\frac{1}{t}\biggr) = \frac{1}{t(\log (x/t))^2},$$


\begin{align} \phi'(t) &= \psi_1'(t)\psi_2(t) + \psi_1(t)\psi_2'(t) \\ &= -\frac{x}{t^2\bigl(\log (x/t)\bigr)} + \frac{x}{t^2\bigl(\log (x/t)\bigr)^2}. \end{align}

For $t \leqslant \sqrt{x}$, the second term is in modulus smaller than the first by a factor between $\frac{1}{\log x}$ and $\frac{1}{\log \sqrt{x}} = \frac{2}{\log x}$, so in the integral the first term is the dominant one, and the second can [a priori, only probably, we need to check that this is the case] be subsumed in the error term.

Using $\pi(t) = \frac{t}{\log t} + O\bigl(\frac{t}{(\log t)^2}\bigr)$ we first get

$$\pi(\sqrt{x})\phi(\sqrt{x}) = \frac{\sqrt{x}}{\log \sqrt{x}}\cdot\frac{x}{\sqrt{x}\log (x/\sqrt{x})}\cdot\Bigl(1 + O\bigl((\log x)^{-1}\bigr)\Bigr) \in O\biggl(\frac{x}{(\log x)^2}\biggr),$$

so this can be subsumed in the error term. As the main contribution to the integral we have

$$-\int_2^{\sqrt{x}} \pi(t)\psi_1'(t)\psi_2(t)\,dt = x\int_2^{\sqrt{x}} \frac{dt}{t(\log t)\bigl(\log(x/t)\bigr)} + x\int_2^{\sqrt{x}} O\biggl(\frac{1}{(\log t)^2}\biggr)\frac{dt}{t\bigl(\log (x/t)\bigr)},$$

where the first term is exactly the integral we want, and the second is smaller due to the additional $\log t$ factor in the denominator. With $\frac{1}{2}\log x \leqslant \log \frac{x}{t} \leqslant \log x$ for $1 \leqslant t \leqslant \sqrt{x}$, we can estimate the second integral by a multiple of

$$\frac{x}{\log x} \int_2^{\sqrt{x}} \frac{dt}{t(\log t)^2},$$

and since $\int_2^{\infty} \frac{dt}{t(\log t)^2} < +\infty$, that is $O(x/\log x)$. For the remaining

$$-\int_2^{\sqrt{x}} \pi(t)\psi_1(t)\psi_2'(t)\,dt,$$

we again pull out $\frac{1}{(\log (x/t))^2}$ and use $\pi(t) \in O(t/\log t)$ to get

$$\Biggl\lvert\int_2^{\sqrt{x}} \pi(t)\psi_1(t)\psi_2'(t)\,dt\Biggr\rvert \leqslant C\cdot\frac{x}{(\log x)^2} \int_2^{\sqrt{x}} \frac{dt}{t(\log t)} \leqslant \tilde{C} \cdot\frac{x\log \log x}{(\log x)^2},$$

so that belongs to $o(x/\log x)$.

Altogether, we have seen that indeed

$$\sum_{p \leqslant \sqrt{x}} \frac{x}{p\log (x/p)} = x\int_2^{\sqrt{x}} \frac{dt}{t(\log t)\bigl(\log (x/t)\bigr)} + O\biggl(\frac{x}{\log x}\biggr).$$

(Note: that yields $\pi_2(x) \sim \frac{x\log \log x}{\log x}$, where $\pi_2(x)$ is the number of semiprimes not exceeding $x$.)

  • $\begingroup$ You write that this yields that $\pi_2(x) \sim \frac{x \log \log x }{\log x}$. But how are you able to see that from the above calculations? $\endgroup$
    – slowpoke
    Dec 17, 2020 at 1:56
  • 1
    $\begingroup$ @slowpoke Which part are you asking about, the last integral being asymptotically $\frac{\log \log x}{\log x}$, or the sum being essentially $\pi_2(x)$? Neither of those is totally obvious. On the other hand, neither is deep. For the integral, the substitution $u = \log t$ and a partial fraction decomposition lead to an explicit evaluation. For the sum, note that grouping semiprimes by their smaller prime factor leads to $$\pi_2(x) = \sum_{p \leqslant \sqrt{x}} \biggl(\pi\biggl(\frac{x}{p}\biggr) - \bigl(\pi(p)-1\bigr)\biggr)$$ (remove the "${}-1$" if you don't want to count squares of primes) $\endgroup$ Dec 17, 2020 at 14:30
  • 1
    $\begingroup$ and the second part of that sum is asymptotically negligible. Then approximating $\pi(y)$ with $\frac{y}{\log y}$ leads to the sum in question. (Of course one needs to verify that this approximation doesn't change the asymptotics.) $\endgroup$ Dec 17, 2020 at 14:30
  • 1
    $\begingroup$ @slowpoke Again I'm not quite sure what you're asking, so I may be off in answering. The "second part" refers to $S_2(x) := \sum_{p \leqslant \sqrt{x}} \bigl(\pi(p) - 1\bigr)$, the first part of the sum giving the value of $\pi_2(x)$ is $S_1(x) := \sum_{p \leqslant x} \pi\bigl(x/p\bigr)$. In order to obtain an asymptotic expression for $\pi_2(x)$, there are several steps to carry out (of course the way can be modified). A) Find that indeed $\pi_2(x) = S_1(x) - S_2(x)$. B) Show that $S_2(x)$ is of smaller order than $S_1(x)$, so that $\pi_2(x) \sim S_1(x)$ follows. $\endgroup$ Jan 5, 2021 at 14:02
  • 1
    $\begingroup$ C) Show that $$S_1(x) = \sum_{p \leqslant \sqrt{x}} \pi\biggl(\frac{x}{p}\biggr) \sim \sum_{p \leqslant \sqrt{x}} \frac{x}{p\log \frac{x}{p}}\,.$$ D) Find the asymptotic behaviour of that last sum. That is here done by writing it as an integral per Abel's formula, and then evaluating/estimating the integral. In each step, except A), one needs to show that some approximation one makes to simplify doesn't affect the overall asymptotics. $\endgroup$ Jan 5, 2021 at 14:02

Taking $\phi\left(z\right)=1/\left(z\log\left(x/z\right)\right) $ in the Abel's formula we have $$S=x\sum_{p\leq\sqrt{x}}\frac{1}{p\log\left(x/p\right)}=\frac{2\pi\left(\sqrt{x}\right)}{\log\left(x\right)}-x\int_{2}^{\sqrt{x}}\frac{\pi\left(t\right)\left(1-\log\left(x/t\right)\right)}{t^{2}\log^{2}\left(x/t\right)}dt $$ $$=\frac{2\pi\left(\sqrt{x}\right)}{\log\left(x\right)}-x\int_{2}^{\sqrt{x}}\frac{\pi\left(t\right)}{t^{2}\log^{2}\left(x/t\right)}dt+x\int_{2}^{\sqrt{x}}\frac{\pi\left(t\right)}{t^{2}\log\left(x/t\right)}dt. $$ Now using the estimation $$\pi\left(z\right)=O\left(\frac{z}{\log^{2}\left(z\right)}\right) $$ and the obvious inequality $$\frac{1}{\log\left(x/t\right)}\leq\frac{2}{\log\left(x\right)},\, t\in\left[2,\sqrt{x}\right]\tag{1} $$ we get $$\int_{2}^{\sqrt{x}}\frac{\pi\left(t\right)}{t^{2}\log^{2}\left(x/t\right)}dt=O\left(\int_{2}^{\sqrt{x}}\frac{dt}{t\log^{2}\left(x/t\right)\log\left(t\right)}\right) $$ $$=O\left(\frac{1}{\log^{2}\left(x\right)}\int_{2}^{\sqrt{x}}\frac{dt}{t\log\left(t\right)}\right)=O\left(\frac{\log\left(\log\left(\sqrt{x}\right)\right)}{\log^{2}\left(x\right)}\right). $$ Using the PNT in the form $$\pi\left(z\right)=\frac{z}{\log\left(z\right)}+O\left(\frac{z}{\log^{2}\left(z\right)}\right) $$ in the other integral we get $$\int_{2}^{\sqrt{x}}\frac{\pi\left(t\right)}{t^{2}\log\left(x/t\right)}dt.=\int_{2}^{\sqrt{x}}\frac{1}{t\log\left(x/t\right)\log\left(t\right)}dt+O\left(\int_{2}^{\sqrt{x}}\frac{1}{t\log\left(x/t\right)\log^{2}\left(t\right)}dt\right) $$ and using again $(1)$ we have $$ \int_{2}^{\sqrt{x}}\frac{1}{t\log\left(x/t\right)\log^{2}\left(t\right)}dt=O\left(\frac{1}{\log\left(x\right)}\right) $$ and finally $$\frac{2\pi\left(\sqrt{x}\right)}{\log\left(x\right)}=O\left(\frac{\sqrt{x}}{\log^{2}\left(x\right)}\right) $$ hence $$x\sum_{p\leq\sqrt{x}}\frac{1}{p\log\left(x/p\right)}=\int_{2}^{\sqrt{x}}\frac{1}{t\log\left(x/t\right)\log\left(t\right)}dt+O\left(\frac{x}{\log\left(x\right)}\right) $$ as wanted.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.