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!)
A130817 a(n) is the total sum of the digits of n-digit primes. 11

%I #11 Jul 03 2023 14:51:52

%S 17,197,2041,19879,195226,1920513,18980518,188098738,1867197599,

%T 18562452601,184727304713,1839816627645,18335212785129,182813489520604

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

%t Table[Plus @@ Flatten[IntegerDigits[Select[Range[10^(n - 1), 10^n], PrimeQ[ # ] &]]], {n, 7}]

%o (PARI) A007953(n)={ local(a=0,shft=n) ; while(shft!=0, a += shft %10 ; shft \= 10 ; ) ; return(a) ; }

%o A130817(n)={ local(a=0) ; forprime(p=10^(n-1),10^n, a += A007953(p) ; ) ; return(a) ; }

%o { for(n=1,30, print(A130817(n)" ") ; ) ; } \\ _R. J. Mathar_, Jan 16 2008

%Y Cf. A006879.

%K base,more,nonn

%O 1,1

%A _Tanya Khovanova_, Jul 16 2007

%E a(8) from _R. J. Mathar_, Jan 16 2008

%E a(9)-a(11) from _Jon E. Schoenfield_, Dec 01 2008

%E a(12)-a(14) from _Giovanni Resta_, Jul 20 2015

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 April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)