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.

A130817 a(n) is the total sum of the digits of n-digit primes.

Original entry on oeis.org

17, 197, 2041, 19879, 195226, 1920513, 18980518, 188098738, 1867197599, 18562452601, 184727304713, 1839816627645, 18335212785129, 182813489520604
Offset: 1

Views

Author

Tanya Khovanova, Jul 16 2007

Keywords

Crossrefs

Cf. A006879.

Programs

  • Mathematica
    Table[Plus @@ Flatten[IntegerDigits[Select[Range[10^(n - 1), 10^n], PrimeQ[ # ] &]]], {n, 7}]
  • PARI
    A007953(n)={ local(a=0,shft=n) ; while(shft!=0, a += shft %10 ; shft \= 10 ; ) ; return(a) ; }
    A130817(n)={ local(a=0) ; forprime(p=10^(n-1),10^n, a += A007953(p) ; ) ; return(a) ; }
    { for(n=1,30, print(A130817(n)" ") ; ) ; } \\ R. J. Mathar, Jan 16 2008

Extensions

a(8) from R. J. Mathar, Jan 16 2008
a(9)-a(11) from Jon E. Schoenfield, Dec 01 2008
a(12)-a(14) from Giovanni Resta, Jul 20 2015