A118482 Partial sums of Chen primes (starting with 1).
1, 3, 6, 11, 18, 29, 42, 59, 78, 101, 130, 161, 198, 239, 286, 339, 398, 465, 536, 619, 708, 809, 916, 1025, 1138, 1265, 1396, 1533, 1672, 1821, 1978, 2145, 2324, 2505, 2696, 2893, 3092, 3303, 3530, 3763, 4002, 4253, 4510, 4773, 5042, 5323, 5616, 5923
Offset: 0
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
Programs
-
Maple
ischenprime:=proc(n); if (isprime(n) = 'true') then if (isprime(n+2) = 'true' or numtheory[bigomega](n+2) = 2) then RETURN('true') else RETURN('false') fi fi end: ts_partsum_chenprime:=proc(n) local i,ans,tren; ans:=1: tren:=1: for i from 1 to n do if (ischenprime(i)='true') then tren := tren+i: ans:=[op(ans), tren]: fi od; RETURN(ans) end: ts_partsum_chenprime(500);
-
Mathematica
Accumulate[Join[{1},Select[Prime[Range[70]],PrimeOmega[#+2]<3&]]] (* Harvey P. Dale, May 26 2014 *)