2
$\begingroup$

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.

$\endgroup$

1 Answer 1

2
$\begingroup$

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$.

$\endgroup$
2
  • $\begingroup$ I drew a diagram that shows the ratio $\frac{sum}{\frac{x^{3/2}}{(\log x)^2}}$ along with n( here ), and the ratio shows a clear decreasing trend, which indicates your lower bound may be the very tight one. Thanks a lot! $\endgroup$
    – nik_nul
    Commented Dec 21, 2023 at 6:30
  • $\begingroup$ I think it is possible that $R_q(x)$ contains some almost primes too, so I conjecture this order to be something like $x^{3/2}(\log\log x)^a/(\log x)^2$ for some positive integer $a$. $\endgroup$
    – TravorLZH
    Commented Dec 22, 2023 at 14:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .