cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A058196 Sum of digits of first 10^n primes.

This page as a plain text file.
%I A058196 #11 Jun 02 2025 04:59:49
%S A058196 2,57,1111,17024,224155,2674957,31352962,363506969,4127383480,
%T A058196 45630284509,502160313778
%N A058196 Sum of digits of first 10^n primes.
%t A058196 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}]
%o A058196 (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
%Y A058196 Cf. A051351, A057573.
%K A058196 nonn,base,more,hard
%O A058196 0,1
%A A058196 _Robert G. Wilson v_, Nov 27 2000
%E A058196 a(9)-a(10) from _Amiram Eldar_, Jun 03 2024