OFFSET
0,1
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
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