Asymptotic Approximation towards Sum of the Composite Number's Smallest Prime Factor

59 Views Asked by At

I wonder if there is any asymptotic approximation towards the sum of the smallest prime factor of the composite numbers which are less than $n$. This is also the sum of terms whose index is not prime in Sequence A020639(OEIS).

I know it won't grow faster than $O(n^\frac{3}{2})$, as a composite number $n$ must have a prime factor less than $\sqrt n$, but I want a lower bound or a more accurate approximation with the same order as the sum for time complexity analysis use.

1

There are 1 best solutions below

2
On

Let $p(n)$ denote the smallest prime factor of $n$, and when $q$ is prime define the set $$ R_q(x) = \{ q< n\le x\colon p(n) = q \}. $$ The OP is then asking about the sum $$ \sum_{\substack{n\le x \\ n\text{ composite}}} p(n) = \sum_{q\le x} q\cdot\#R_q(x). $$ Note that the sum on the right-hand side can be restricted to $q\le\sqrt x$, as the OP pointed out.

Zander's answer to a similar question points out that $\#R_q(x) \le \frac xq$ and that therefore $$ \sum_{q\le\sqrt x} q\cdot\#R_q(x) \le \sum_{q\le\sqrt x} x = x\pi(\sqrt x) \ll \frac{x^{3/2}}{\log x}. $$

On the other hand, $R_q(x)$ includes all numbers of the form $qr$ where $r$ is prime and $q\le r\le \frac xq$, and so \begin{align*} \sum_{q\le\sqrt x} q\cdot\#R_q(x) &\ge \sum_{q\le\sqrt x} q \bigl( \pi(\tfrac xq) - \pi(q) \bigl). \end{align*} When $q\le\frac12\sqrt x$ we have $\tfrac xq \ge 4q$ and thus $\pi(\tfrac xq) \ge (4-o(1)) \pi(q)$; consequently, \begin{align*} \sum_{q\le\sqrt x} q\cdot\#R_q(x) &\gg \sum_{q\le\frac12\sqrt x} q \pi(\tfrac xq) \gg \sum_{q\le\frac12\sqrt x} q \frac{x/q}{\log(x/q)} \\ &\ge \frac x{\log x} \sum_{q\le\frac12\sqrt x} 1 = \frac x{\log x} \pi(\tfrac12\sqrt x) \gg \frac{x^{3/2}}{(\log x)^2}. \end{align*} I suspect this lower bound is the correct order of magnitude, since the lower bound of $\#R_q(x)$ is tight when $q>\sqrt[3]x$.