# Asymptotic behaviour of the quantities involving sums over primes.

What is the Asymptotic behaviour of the following quantity ? $$\begin{eqnarray*} \sum_{p- \text{prime} \\ p \leq x } \frac{ \ln (p) }{p}. \end{eqnarray*}$$

Motivation: I am looking at this paper https://scholar.princeton.edu/sites/default/files/ashvin/files/math229xfinalproject.pdf

This has got me to think about the number of numbers that can be expressed as the product of two primes $$\begin{eqnarray*} \pi_{ \alpha \beta} (x) &=& \sum_{p \leq q- \text{prime} \\ pq \leq x } 1 \\ &=& \sum_{p- \text{prime} \\ p \leq x } \pi \left(\frac{x}{p} \right) \\ &=& \sum_{p- \text{prime} \\ p \leq x } \frac{x/p}{\ln( x/p)} \\ &=& \sum_{p- \text{prime} \\ p \leq x } \frac{x}{p(\ln( x)-\ln(p))}. \end{eqnarray*}$$ Geometrically expanding $$\begin{eqnarray*} \frac{1}{\ln( x)-\ln(p)}= \frac{1}{\ln(x)} + \frac{\ln(p)}{(\ln(x))^2}+ \cdots. \end{eqnarray*}$$ We have $$\begin{eqnarray*} \pi_{ \alpha \beta} (x) &=& \frac{x}{\ln(x)} \sum_{p- \text{prime}} \frac{1}{p} +\frac{x}{(\ln(x))^2} \sum_{p- \text{prime}} \frac{\ln(p)}{p} +\cdots \end{eqnarray*}$$ Now the recognise first sum as the content of Merten's second theorem https://en.wikipedia.org/wiki/Mertens%27_theorems $$\begin{eqnarray*} \sum_{p- \text{prime}} \frac{1}{p} = m + \ln( \ln (x)) +\cdots \end{eqnarray*}$$ where $$m$$ is the Merten-Meissel constant. But what about the second sum ? $$\begin{eqnarray*} \sum_{p- \text{prime}} \frac{\ln(p)}{p} = ? \end{eqnarray*}$$ Ideally a good answer will tell me how to approach calculating a quantity like this & a wonderful answer will perform the calculation & indicate how to calculate higher order terms.

• Try applying partial summation (see this wikipedia article: en.wikipedia.org/wiki/Abel%27s_summation_formula). Let $A(x) = \sum_{p\leq x} \frac{1}{p}$. Then $$\sum_{p\leq x} \frac{\ln p}{p} = (\ln x) A(x) - \int_{1}^{x} \frac{A(x)}{x} dx.$$ Aug 14, 2021 at 23:44
– Gary
Aug 15, 2021 at 6:28

Let me first lead with that the question, as stated, is nearly a duplicate of this question. However, since this question also asks for more general approaches to problems like this, I'll leave a relatively general approach below that allows one to calculate series like this without too much effort.

Approach

We utilize Riemann-Stieltjes integration. Observe that

$$\sum_{p\text{ prime}}f(p)=\int_{2^{-}}^\infty f(x)\,d\pi(x)$$ where $$\pi(x)=\sum_{p\text{ prime}}1$$ is the prime counting function. Thus, if we find a good approximation of $$\pi(x)$$, we can estimate the value of integrals like this asymptotically using integration by parts. For several problems, the approximation $$\pi(x)=\frac{x}{\log x}+O\left(xe^{-c\sqrt{\log x}}\right)$$ for a positive constant $$c$$ (better estimates are known but this is sufficient for our purposes). For $$p\leq T$$, we have \begin{align*} \int_{2^-}^T f(x)\,d\pi(x)&=\int_{2^-}^T f(x)\,d\left(\frac{x}{\log x}+O\left( xe^{-c\sqrt{\log x}}\right)\right)\\ &=\int_{2^-}^Tf(x)\,d\left(\frac{x}{\log x}\right)+\int_{2^{-}}^T f(x)\,d\left(O\left( xe^{-c\sqrt{\log x}}\right)\right)\\ &=\int_2^T f(x)\left(\frac{\log x -1}{\log^2 x}\right)\,dx+\mathcal{E}\tag{1} \end{align*} where $$\mathcal{E}$$ represents the error. The error can be estimated using integration by parts in the following way: \begin{align*} \int_{2^-}^T f(x)\,dO\left( xe^{-c\sqrt{\log x}}\right)&\ll xf(x)e^{-c\sqrt{\log x}}\bigg]_{x=2}^{x=T}+\int_{2}^T xe^{-c\sqrt{\log x}}\ f'(x)\,dx\\ &=O\left(\max\left\{Tf(T)e^{-c\sqrt{\log T}},1\right\}\right)+\int_2^{T/2} f'(x) e^{-c\sqrt{\log x}}\,dx \\ & \quad +\int_{T/2}^T f'(x)e^{-c\sqrt{\log x}}\,dx\\ &\ll \max\left\{f(T)e^{-c\sqrt{\log T}},1\right\} \end{align*} Here, I've skipped a few relatively minor details because it's dependent on the specific function $$f$$ that you are summing. First: the constant $$c$$ in the exponent changes (but remains bounded below by a positive constant). The split of the integral in the second step is not always strictly necessary, but there are instances where it is beneficial, so I wanted to write it down here. Lastly, the first integral in the second step has not been evaluated whereas the second integral can be bounded above using the lower bound $$T/2$$ for the exponential term and the fundamental theorem of calculus.

Applying the Approach to this Problem

In this problem, we have $$f(p)=\frac{\log p}{p}$$, or in the continuous analog, $$f(x)=\frac{\log x}{x}$$. Inserting this into the integral, we need to calculate the main term $$\int_2^T\frac{\log x-1}{x\log x}\,dx=\int_2^T\frac{1}{x}-\frac{1}{x\log x}\,dx$$ Integrating, we have the main term equal to $$\log T-\log\log T+O(1)$$ I'll leave verifying the error terms for you, but this shows the following asymptotic: $$\sum_{p\leq x\\ p\text{ prime}}\frac{\log p}{p}\sim \log x$$

Riemann's Hypothesis

One of the reasons RH is frequently assumed in analytic number theory papers is because the estimate for primes becomes the much better $$\pi(x)=\int_2^x {\frac{{dt}}{{\log t}}}+O(\sqrt{x}\log x).$$

• Your last formula is incorrect. $x/\log x$ should be replaced by ${\mathop{\rm Li}\nolimits} (x) = \int_2^x {\frac{{dt}}{{\log t}}}$. Otherwise the error is $\mathcal{O}(x/\log^2 x)$.
– Gary
Aug 15, 2021 at 6:26
• You’re right; I’m not at my desktop at the moment so cannot fix it. Feel free to edit it or I can do that tomorrow. Thank you @Gary Aug 15, 2021 at 6:28

It is known that $$\sum\limits_{p\leqslant x}\frac{\ln p}{p-1}=\ln x + \gamma + o(1)$$ here $$\gamma$$ is Euler constant. Therefore $$\sum\limits_{p\leqslant x}\frac{\ln p}{p}=\ln x + \gamma + \sum\limits_{p\leqslant x}\frac{\ln p}{p(p-1)}+ o(1)$$ here $$\sum\limits_{p\leqslant x}\frac{\ln p}{p(p-1)} = O(1)$$ - is converges.

For calculate asymptotic you may just use $$p_n\sim n\ln n, \ln p_n \sim \ln p_n$$: $$\sum\limits_{p\leqslant x}\frac{\ln p}{p}\sim \sum\limits_{t\leqslant \pi(x)}\frac{\ln t}{t\ln t}\sim\int_c^{\pi(x)}\frac{dt}{t} \sim \ln t |_{\pi (x)}\sim\ln \pi(x) \sim \ln x$$

• $\pi_{\alpha\beta}(x)$ once upon a time calculated ..., found: en.wikipedia.org/wiki/Almost_prime , formula at the bottom Aug 20, 2021 at 11:36
• Thanks Sonic, useful answer. Aug 20, 2021 at 16:26