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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A034387 Sum of primes <= n. 24
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; 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 (hillcino368(AT)hotmail.com), Jun 08 2008

Equals row sums of triangle A143537 [From Gary W. Adamson (qntmpkt(AT)yahoo.com), 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). [From Jaroslav Krizek (jaroslav.krizek(AT)atlas.cz), Mar 23 2009]

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 or danfux(AT)OpenGaia.com), Apr 07 2001

MATHEMATICA

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

PROG

(PARI) a(n)=sum(i=1, primepi(n), prime(i)) [From Michael Porter (michael_b_porter(AT)yahoo.com), Sep 22 2009]

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

CROSSREFS

Cf. A007504.

A143537 [From Gary W. Adamson (qntmpkt(AT)yahoo.com), Aug 23 2008]

Cf. A158662, A000040, A002808. [From Jaroslav Krizek (jaroslav.krizek(AT)atlas.cz), Mar 23 2009]

Cf. A073837, A066779, A034386, A000720. [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jul 05 2010]

Sequence in context: A050175 A059797 A173567 * A081240 A184443 A132295

Adjacent sequences:  A034384 A034385 A034386 * A034388 A034389 A034390

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

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

Content is available under The OEIS End-User License Agreement .

Last modified February 16 10:28 EST 2012. Contains 205904 sequences.