I would like to ask if there is a good upper bound on the difference $$D\_2(n)=\sum\_{n^{1/3}<p,q\leq n^{1/2}} \left(\frac{n}{pq}-\left\lfloor \frac{n}{pq}\right\rfloor\right)\quad (1) $$where $p$ and $q$ range over primes in the given interval. I believe that the ratio $$R\_2(n)=\frac{\sum\_{n^{1/3}<p,q\leq n^{1/2}} \left\lfloor \frac{n}{pq}\right\rfloor}{\sum\_{n^{1/3}<p,q\leq n^{1/2}} \frac{n}{pq} }\quad (2)$$ approaches 1, as $n\rightarrow \infty$ from below.


**Question 1:** Is the claimed limit for (2) correct? How would it be proved rigorously?


**Question 2:** Is there a tight upper bound on $D\_2(n)$ as $n$ goes to infinity?


More generally, define 


$$D\_k(n)=\sum\_{n^{1/(k+1)}<p\_1,\ldots,p\_k\leq n^{1/k}} \left(\frac{n}{p\_1 p\_2 \cdots p\_k}-\left\lfloor \frac{n}{p\_1 p\_2 \cdots p\_k}\right\rfloor\right)$$
where the $p\_i$ range over primes in the interval given, and define $R\_k(n)$ analogously.


Can Questions 1 and 2 be answered for these quantities? Note that I am intersted in both the case of $k$ fixed, as well as $k$ slowly growing, but satisfying $k\leq c \lfloor \log \log n \rfloor,$ with $c<2$ a constant. My goal is to approximate the sum with the floor functions by means of the sum without the floor functions.



An upper bound on $\sum_{n^{1/3}<p,q\leq n^{1/2}} \frac{n}{pq}-\lfloor \frac{n}{pq}\rfloor$
Based on @GerhardPaseman and @alpoge's remarks I have written this answer, for $k=2.$ Consider
$$
D\_2(n)=\sum\_{n^{1/3}<p,q\leq n^{1/2}} \left(\frac{n}{pq}-\left\lfloor \frac{n}{pq}\right\rfloor\right)\quad (1)
$$
where $p,q$ are primes, and note that each term in (1) is positive, and in $[0,1),$ which gives
$$
D\_2(n)<\#\{p \in (n^{1/3},n^{1/2}]: p~~a~~prime~\}^2=[\pi(n^{1/2})-\pi(n^{1/3})]^2=$$
$$
\approx \left[\frac{2n^{1/2}}{\log n}-\frac{3n^{1/3}}{\log n}\right]^2\ll \frac{n}{\log^2 n}.$$
Now consider the approximating sum
$$
S\_2'(n)=\sum\_{n^{1/3}<p,q\leq n^{1/2}} \frac{n}{pq}=\left[\sum\_{n^{1/3}<p\leq n^{1/2}}\frac{\sqrt{n}}{p}\right]^2=n\left[\sum\_{n^{1/3}<p\leq n^{1/2}}p^{-1}\right]^2\asymp
$$
$$
\asymp n [\log\log(n^{1/2})-\log\log(n^{1/3})]^2=\log^2(3/2) n =c~ n,\quad(2)
$$
with $c \in (0,1).$ From (1), the sum I am interested in satisfies
$$
S\_2(n)=\sum\_{n^{1/3}<p,q\leq n^{1/2}} \left\lfloor \frac{n}{pq}\right\rfloor> c~n -\frac{n}{\log^2 n} \gg c~n$$
for $n$ large enough.


For $k$ larger and fixed, one can argue essentially the same way, and the implied constant $c$ in (2) becomes $\log^2((k+1)/k)$ so increasingly smaller.


The open question is, what can be done, if anything, to lower bound
$$
S\_k(n)=\sum\_{n^{1/(k+1)}<p\_1,\ldots,p\_k\leq n^{1/k}} \left\lfloor \frac{n}{p\_1 p\_2 \cdots p\_k}\right\rfloor
$$
for $k=\alpha \log\log n,$ and $0<\alpha<2.$


