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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077645 Sum of all primes having n decimal digits. 1
17, 1043, 75067, 5660269, 448660141, 37096005486, 3165774592333, 276006465392920, 24460302301867259, 2196082920489474703, 199246255311162951776, 18234121474806961230363 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Also, except for the first term, the sum of the primes between 10^n and 10^(n+1). - Cino Hilliard, May 31 2008

a(12) to a(20) were computed from A046731(12)-A046731(11) to A046731(20)-A046731(19). - Cino Hilliard, May 31 2008

A good estimate for the sum of the primes < k is k^2/(2*log(k)-1). Using this formula, a(20)~(10^20)^2/(2*log(10^20)-1) -(10^19)^2/(2*log(10^19)-1) = 108609290005707493265628731014013409909. The relative error this formula produces for the last 5 terms is a(16): -0.00019454, a(17): -0.00017176, a(18): -0.00015275, a(19): -0.00013674, a(20): -0.00012312. - Cino Hilliard, May 31 2008

LINKS

Cino Hilliard, May 31 2008, Table of n, a(n) for n = 1..20

Cino Hilliard, Count,Sum primes in a range Win32 Gcc+Gmp.

FORMULA

a(n) = Sum_{10^(n-1) <= p <= 10^n, p prime} p = A007504(A000720(10^n)) - A007504(A000720(10^(n-1))).

EXAMPLE

a(1) = 2 + 3 + 5 + 7 = 17, sum of four 1-digit primes.

MAPLE

a:=proc(n) local tot, b, j: tot:=nextprime(10^(n-1)): b:=nextprime(10^(n-1)): for j while nextprime(b) < 10^n do tot:=tot+nextprime(b): b:=nextprime(b) end do:tot end proc: # Emeric Deutsch, Oct 08 2007

MATHEMATICA

Prepend[Table[Apply[Plus, Table[Prime[w], {w, PrimePi[10^(n-1)]+1, PrimePi[10^n]}]], {n, 2, 7}], 17] (* corrected by Ivan N. Ianakiev, Aug 12 2016 *)

CROSSREFS

Cf. A000040, A000720, A006879, A007504.

Sequence in context: A258304 A221343 A221376 * A046731 A221268 A179157

Adjacent sequences:  A077642 A077643 A077644 * A077646 A077647 A077648

KEYWORD

base,nonn

AUTHOR

Labos Elemer, Nov 18 2002

EXTENSIONS

2 more terms from Lior Manor, Sep 11 2007

Corrected and extended by Emeric Deutsch, Oct 08 2007

More terms from Cino Hilliard, May 31 2008

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 17 06:08 EDT 2019. Contains 328106 sequences. (Running on oeis4.)