Asymptotic expression for sum of first n prime numbers?

1.4k Views Asked by At

Is one known? If not, what are the best known bounds? Is there reason to think that an asymptotic expression is beyond current methods if none exists?

1

There are 1 best solutions below

0
On

Sinha's paper On the asymptotic expansion of the sum of the first n primes gives quite a bit of info including a few bounds and various asymptotic results (including some from Dusart).

The simple one, as Daniel Fischer pointed out, is

$$\sum_{k=1}^n p_k \approx \frac{n^2}{2}\ln n$$

Dusart (1998) showed

$$\sum_{k=1}^n p_k = \frac{n^2}{2}(\ln n + \ln\ln n - 3/2 + o(1))$$

Sinha (2011) showed

$$\sum_{k=1}^n p_k = \frac{n^2}{2}\left[\ln n + \ln\ln n - \frac{3}{2} + \frac{\ln\ln n}{\ln n} - \frac{5}{2\ln n} - \frac{\ln^2\ln n}{2\ln^2 n} + \frac{7\ln\ln n}{2\ln^2 n} - \frac{29}{4\ln^2 n} + o\left(\frac{1}{\ln^2 n}\right)\right]$$

Axler works through a lot of the math behind these in a June 2016 arXiv paper.

I'd also like to note that it is possible to write a prime sum function similar to fast prime count functions. This gives exact results quite a bit faster than standard sieve+sum code.

For those with a more practical bent, I highly recommend Kim Walisch's Primesum program and documentation. It implements the summation using fast combinatorial methods combined with excellent optimization and parallelization. It has been used to compute exact answers for primes below $10^{24}$ for instance.