The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A038346 Sum of first n primes of form 4k+1. 3

%I #21 Oct 18 2021 08:40:12

%S 5,18,35,64,101,142,195,256,329,418,515,616,725,838,975,1124,1281,

%T 1454,1635,1828,2025,2254,2487,2728,2985,3254,3531,3812,4105,4418,

%U 4735,5072,5421,5774,6147,6536,6933

%N Sum of first n primes of form 4k+1.

%H Jianing Song, <a href="/A038346/b038346.txt">Table of n, a(n) for n = 1..10001</a>

%F a(n) = Sum_{k=1..n} A002144(k). - _Michel Marcus_, Oct 18 2021

%t Accumulate[Select[Prime[Range[100]],IntegerQ[(#-1)/4]&]] (* _Harvey P. Dale_, Jul 25 2011 *)

%o (PARI) a(n) = my(s=0); forprime(p=2, , if(p%4==1, s+=p; if(n--<1, return(s)))) \\ following _Charles R Greathouse IV_'s program for A078586

%Y Cf. A002144, A002313, A006278, A038347.

%K easy,nonn

%O 1,1

%A Den Roussel (DenRoussel(AT)webtv.net)

%E Offset corrected by _Jianing Song_, Oct 18 2021

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 June 2 06:30 EDT 2024. Contains 373032 sequences. (Running on oeis4.)