A077645 Sum of all primes having n decimal digits.
17, 1043, 75067, 5660269, 448660141, 37096005486, 3165774592333, 276006465392920, 24460302301867259, 2196082920489474703, 199246255311162951776, 18234121474806961230363, 1680810854825228712978117, 155890014267359161122671527, 14534809256197269457684141345, 1361418455796443892761407164186
Offset: 1
Examples
a(1) = 2 + 3 + 5 + 7 = 17, sum of four 1-digit primes.
Links
- Hugo Pfoertner, Table of n, a(n) for n = 1..26 (terms 1..20 from Cino Hilliard).
- Cino Hilliard, Count,Sum primes in a range Win32 Gcc+Gmp.
Programs
-
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 *)
Formula
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
Comments