Asymptotic sums and big-O notation

140 Views Asked by At

Suppose I have to compute the following asymptotic sum ($x\rightarrow\infty$): $$ S(x):=\sum_{n\leq f(x)} O(g(x,n))\;, $$ where the function $g(x,n)$ is non-decreasing in $n$, so that in our case $g(x,n)\leq g(x,f(x))=:G(x)$. Now my problem is: can I say that $$ S(x)=O(f(x)G(x)) $$ as $x\rightarrow\infty$?

For example, I have this problem: an unconditional version of Chebotarev Density Theorem (Lagarias, Odlyzko) says that if $n\leq (\log x)^{1/7}$ then $$ \pi(x,n) = \frac1{k_n}{\rm li}(x) + O(x \exp(-A\sqrt{\log x}/n))\;, $$ for a certain absolute constant $A$. I'm interested in what happens when I perform the sum $$ \sum_{n\leq (\log x)^{1/7}} g(n) \pi(x,n) $$ where $g(n)$ is an arithmetic function. In particular, how should I deal the error term $$ \sum_{n\leq (\log x)^{1/7}} g(n)O(x \exp(-A\sqrt{\log x}/n))\;? $$ I wrote it as $$ \sum_{n\leq (\log x)^{1/7}} g(n)O(x \exp(-A(\log x)^{4/15})) $$ but then I'd like to deal with something like $$ O\left( \sum_{n\leq (\log x)^{1/7}} g(n)x \exp(-A(\log x)^{4/15})\right)\;, $$ but I'm afrai I can't do it. Am I wrong?

I hope the question is clear, maybe it's trivial but I don't know a certain answer.