login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A119491 Sum of the first n n-digit primes. 2
2, 24, 311, 4062, 50153, 600240, 7000409, 80000960, 900000729, 10000000754, 110000001257, 1200000001154, 13000000002051, 140000000003318, 1500000000003685, 16000000000004454, 170000000000009723, 1800000000000004696, 19000000000000007691, 200000000000000006828 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..300 (first 100 terms from Robert G. Wilson v)
EXAMPLE
The first three three-digit primes are: 101, 103 and 107. Their sum is 311. Hence a(3) is 311.
MAPLE
with(numtheory): a:=n->add(ithprime(pi(nextprime(10^(n-1)))+i), i=0..n-1): seq(a(n), n=1..9); # Emeric Deutsch, Jul 29 2006
MATHEMATICA
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ@k, k++ ]; k]; f[n_] := Plus @@ Rest@NestList[NextPrim, 10^(n - 1), n]; Array[f, 18] (* Robert G. Wilson v, Aug 01 2006 *)
Total/@Table[Rest[NestList[NextPrime[#]&, 10^(n-1), n]], {n, 30}] (* Harvey P. Dale, Sep 01 2022 *)
PROG
(Python)
from sympy import nextprime
def a(n):
s = p = nextprime(10**(n-1))
for n in range(n-1): p = nextprime(p); s += p
return s
print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Feb 24 2021
CROSSREFS
Cf. A114053.
Sequence in context: A065513 A246190 A246610 * A001864 A099045 A181174
KEYWORD
base,nonn
AUTHOR
Tanya Khovanova, Jul 26 2006
EXTENSIONS
a(5)-a(8) from Emeric Deutsch, Jul 29 2006
a(9)-a(18) from Robert G. Wilson v, Aug 01 2006
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 22 00:58 EDT 2024. Contains 374478 sequences. (Running on oeis4.)