login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A034387 Sum of primes <= n. 32
0, 2, 5, 5, 10, 10, 17, 17, 17, 17, 28, 28, 41, 41, 41, 41, 58, 58, 77, 77, 77, 77, 100, 100, 100, 100, 100, 100, 129, 129, 160, 160, 160, 160, 160, 160, 197, 197, 197, 197, 238, 238, 281, 281, 281, 281, 328, 328, 328, 328, 328, 328 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Also sum of all prime-factors in n!.

For large n, these numbers can be closely approximated by the number of primes < n^2. For example, the sum of primes < 10^10 = 2220822432581729238. The number of primes < (10^10)^2 or 10^20 = 2220819602560918840. This has a relative error of 0.0000012743... - Cino Hilliard, Jun 08 2008

Equals row sums of triangle A143537. - Gary W. Adamson, Aug 23 2008

a(n) = A158662(n) - 1. a(p) - a(p-1) = p, for p = primes (A000040), a(c) - a(c-1) = 0, for c = composite numbers (A002808). - Jaroslav Krizek, Mar 23 2009

Partial sums of A061397. - Reinhard Zumkeller, Mar 21 2014

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

Cino Hilliard, Sum of primes

FORMULA

From the prime number theorem a(n) has the asymptotic expression: a(n) ~ n^2 / (2 log n). - Dan Fux (dan.fux(AT)OpenGaia.com), Apr 07 2001

a(n) = n^2/(2 log n) + O(n^2 log log n/log^2 n). - Vladimir Shevelev and Charles R Greathouse IV, May 29 2014

Conjecture: G.f.: Sum_{i>0} Sum_{j>=i} Sum_{k>=j|i-j+k is prime} x^k. - Benedict W. J. Irwin, Mar 31 2017

MATHEMATICA

s=0; Table[s=s+n*Boole[PrimeQ[n]], {n, 100}] (* Zak Seidov, Apr 11 2011 *)

Accumulate[Table[If[PrimeQ[n], n, 0], {n, 60}]] (* Harvey P. Dale, Jul 25 2016 *)

PROG

(PARI) a(n)=sum(i=1, primepi(n), prime(i)) \\ Michael B. Porter, Sep 22 2009

(PARI) a=0; for(k=1, 100, print1(a=a+k*isprime(k), ", ")) \\ Zak Seidov, Apr 11 2011

(Haskell)

a034387 n = a034387_list !! (n-1)

a034387_list = scanl1 (+) a061397_list

-- Reinhard Zumkeller, Mar 21 2014

CROSSREFS

Cf. A007504, A158662, A073837, A066779, A034386, A000720.

This is a lower bound on A287881.

Sequence in context: A288726 A265129 A212624 * A081240 A184443 A238655

Adjacent sequences:  A034384 A034385 A034386 * A034388 A034389 A034390

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 21 12:43 EST 2017. Contains 295001 sequences.