# Proof of $\pi _2 (x)=\sum_{p \leq \sqrt{x}} \pi(\frac{x}{p}) + O(\frac{x}{(\log x)^2})$

I need to prove that $$\pi _2 (x)=\sum_{p \leq \sqrt{x}} \pi(\frac{x}{p}) + O(\frac{x}{(\log x)^2})$$ by using and showing that $$\pi _2(x)=\sum_{p_1 \leq \sqrt{x}}\sum _{p_1 < p_2 \leq \frac{x}{p_1}}1$$. Where $$\pi_2(x)$$ denotes the number of integers less than $$x$$ which is composed of presicely two destinct primes.

And regarding the second sum ($$\pi _2(x)=\sum_{p_1 \leq \sqrt{x}}\sum _{p_1 < p_2 \leq \frac{x}{p_1}}1$$), maybe someone can explain how it should be understood.

Lastly, maybe someone has encountered the function $$\pi_2$$ before, and know where I can read about it.

• Well, if "which is composed of presicely two primes" means "which is the product of two different primes", that "second sum" makes sense. – user436658 Dec 15 '20 at 17:58
• yes, I mean of two different primes, thank you! :) But I still can'ẗ seem to understand the sum. How, for instance, would you calculate it if $x=12$ – slowpoke Dec 15 '20 at 18:01
• I guess (it would be better to say so explicitly) that all your variables $p, p_i$ only take primes as values. So the outer sum is only over $p_1=2, 3$. For $p_1=2$, the inner sum is over $2<p_2\le12/2=6$, so it's $2$ (two primes, $3$ and $5$, in that interval). For $p_1=3$, you have $3<p_2\le12/3=4$, and there are no primes, there. The total is $2+0=2$, then. – user436658 Dec 15 '20 at 18:12
• Thank you for explaining. It makes sense to me now. One of my issues was that I thought that 1 counted as a prime in the sum, but I see that it doesn't. – slowpoke Dec 15 '20 at 18:50
• This may help clarifying. – Daniel Fischer Dec 15 '20 at 19:30