Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)
A058196 Sum of digits of first 10^n primes. 0
2, 57, 1111, 17024, 224155, 2674957, 31352962, 363506969, 4127383480, 45630284509, 502160313778 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
MATHEMATICA
NextPrime[ n_Integer ] := Module[ {k}, k = n + 1; While[ ! PrimeQ[ k ], k++ ]; k ]; c = d = p = q = 0; Do[ While[ d++; d <= 10^n, q = NextPrime[ q ]; p = p + Apply[ Plus, RealDigits[ q ][ [ 1 ] ] ]; If[ PrimeQ[ p ], c++ ] ]; d--; Print[ p ], {n, 0, 10}
PROG
(PARI) a(n) = {my(k = 0, s = 0, pow = 10^n); forprime(p = 2, , k++; s += sumdigits(p); if(k == pow, break)); s; } \\ Amiram Eldar, Jun 03 2024
CROSSREFS
Sequence in context: A189057 A229015 A324318 * A024237 A030263 A359242
KEYWORD
nonn,base,more
AUTHOR
Robert G. Wilson v, Nov 27 2000
EXTENSIONS
a(9)-a(10) from Amiram Eldar, Jun 03 2024
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 August 18 18:23 EDT 2024. Contains 375273 sequences. (Running on oeis4.)