3
$\begingroup$

I would like to study the asymptotic behaviour of this sequence A014285, see as OEIS, that seems has few references and a good behaviour (see the sequence as graph) $$\sum_{k=1}^nkp_k,$$ where $p_k$ is the kth prime number.

I believe that with (if the following definition for $a(n)$ is well defined)

$$ a(n) = \begin{cases} k, & \text{if $n$ is the kth prime number} \\ 0, & \text{otherwise} \end{cases}$$ then that using Abel summation formula $$\sum_{k=1}^nkp_k=p_n\cdot\frac{n(n+1)}{2}-2-\int_2^{p_n}\left(\sum_{p_k\leq t}k\right)dt.$$

Question. Does previous identity holds? How do you get the asymptotic behaviour of such sequence $\sum_{k=1}^nkp_k$?

If my computations were rights, more or less I believe that, using Prime Number theorem, there is an equivalence with $\sim n^3\log n$, and thus one has $O(n^{3+\delta})$ for some little $\delta>0$. I don't know how do good approximations for the integral, in previous identity.

Summarizing, I believe that I could be mistakes in my computations but I would like to know how obtain previous computations in the right way, to know something about how grows this sequence (I know from an asnwer that $\sum_{p_k\leq x} p_k\sim\frac{x^2}{\log x}$, I say to me this last, to do a comparision) Thanks in advance.

$\endgroup$
  • 3
    $\begingroup$ I deleted my 1st comment because I thought I had an error in the upper limit of my integral and wanted to consider it. By the prime number theorem we have $p_k\sim k\log k$ so we should expect $\sum{j\leq n}k p_k\sim \sum_{j\leq n} k^2\log k\sim \int_2^n x^2\log x\; dx\sim (n^3/3)\log n.$ Which is exactly what I said before. $\endgroup$ – DanielWainfleet Feb 25 '16 at 9:41
  • $\begingroup$ Very thanks much, I take notes from your contribution. I know that my answer is poor by comparision of $x^3\log x$ with $x^3$, thus I believe your answer is more better that myself. Thanks @user254665 $\endgroup$ – user243301 Feb 25 '16 at 9:45
3
$\begingroup$

Your application of the Abel summation formula is not quite correct, you have a spurious $-2$ in there from wrongly evaluated boundary terms. Correct is

\begin{align} \sum_{k = 1}^n kp_k &= \int_1^{p_n} t\,dA(t)\\ &= \bigl[tA(t)\bigr]_1^{p_n} - \int_1^{p_n} A(t)\,dt\\ &= p_n\frac{n(n+1)}{2} - \int_1^{p_n} A(t)\,dt\\ &= p_n\frac{n(n+1)}{2} - \int_2^{p_n} A(t)\,dt, \end{align}

where

$$A(t) = \sum_{n \leqslant t} a(n) = \sum_{p_k \leqslant t} k = \frac{\pi(t)\bigl(\pi(t)+1\bigr)}{2}.$$

Since $A(t) = 0$ for $t < 2$, it is irrelevant whether we let the lower limit of the last integral be $1$ or $2$. Using a lower bound of $1$ rather than $2$ in the Riemann-Stieltjes integral of the first line avoids the problem of remembering whether

$$\int_2^{p_n} t\,dA(t)$$

should be interpreted as

$$\int_{(2,p_n]}t\,dA(t)\quad\text{or as}\quad \int_{[2,p_n]} t\,dA(t)$$

and accordingly whether in the integration by parts one should subtract $2A(2) = 2$ or $2A(2^-) = 0$. Here we have the term $1p_1$ in the sum, so the interval must be $[2,p_n]$ and the value to subtract is $2A(2^-)$. Choosing a lower limit of the integral to a point where $A$ is continuous removes that problem.

One can obtain the asymptotic behaviour from

$$\sum_{k = 1}^n kp_k = p_n\frac{n(n+1)}{2} - \int_2^{p_n} A(t)\,dt$$

using known asymptotics for $p_n$ and $\pi(t)$, but it is easier to do in a different way.

We can use bounds for $p_k$ by Pierre Dusart, which tell us

$$p_k = k\log k + k\log \log k - k + o(k)$$

and obtain the principal term(s) of the asymptotic behaviour from those in a relatively simple manner. We have

$$\sum_{k = 1}^n kp_k = \Biggl(\sum_{k = 1}^n k^2\log k\Biggr) + O(n^3\log \log n)$$

if we only take the dominant terms into account, and by the Euler-Maclaurin sum formula

$$\sum_{k = 1}^n k^2\log k = \frac{n^2\log n}{2} + \int_1^n t^2\log t\,dt + O(n^2\log n).$$

The last integral is easy to evaluate,

$$\int_1^n t^2\log t\,dt = \biggl[\frac{t^3\log t}{3}\biggr]_1^n - \frac{1}{3}\int_1^n t^2\,dt = \frac{n^3\log n}{3} - \frac{n^3-1}{9}.$$

This suffices to conclude

$$\sum_{k = 1}^n kp_k \sim \frac{n^3\log n}{3}.$$

Using the approximation $p_k \approx k\log k + k \log \log k$, we obtain

$$\sum_{k = 1}^n kp_k = \frac{n^3(\log n + \log \log n)}{3} + O(n^3)$$

and some more work allows to find the constant factor of $n^3$ in the asymptotic expansion.

$\endgroup$
  • $\begingroup$ Now I am studying your proof, you have a 100/100 as grade notes for your solution in this exercise (not spurious!). Thanks @DanielFischer $\endgroup$ – user243301 Feb 25 '16 at 12:06
1
$\begingroup$

This is not an answer since based on numerical simulation.

Being very lazy, I just used numerical simulation and performed a nonlinear regression ($1\leq n \leq 5000$) assuming as a model $$\sum_{k=1}^nkp_k=a\, n^b \log^c(n)$$ The fit is very good as shown below

$$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} & \text{Confidence Interval} \\ a & 0.31750 & 0.001369 & \{0.31482,0.32019\} \\ b & 2.98669 & 0.000472 & \{2.98577,2.98762\} \\ c & 1.11878 & 0.003889 & \{1.11116,1.12640\} \\ \end{array}$$

The coefficients are very close to what user254665 wrote in comments.

$\endgroup$
  • $\begingroup$ Very thanks much @ClaudeLeibovivi your answer also is very useful, since give us other aproach, great too! $\endgroup$ – user243301 Feb 25 '16 at 12:07
  • $\begingroup$ @user243301. You are very welcome ! This is just brute force. In fact, if you set $c=1$, $b=3.00111$ and $a=0.362178$. From statistical tests, if $c=1$, $b$ must be slightly larger than $3$. $\endgroup$ – Claude Leibovici Feb 25 '16 at 12:12
  • $\begingroup$ Thanks to you Claude Leibovici and @user254665, I am laerning more slowly, by this I like see different tactics to solve the problem. $\endgroup$ – user243301 Feb 25 '16 at 12:16
  • $\begingroup$ @user243301. Reasoning is the only way to go ! You got very nice answers from user254665 and Daniel Fischer. What I did can give ideas but not more. My life was simple reading your post and I just tried your model. I did not create anything. $\endgroup$ – Claude Leibovici Feb 25 '16 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy