A166039 Sums of three consecutive nonprimes A141468.
5, 11, 18, 23, 27, 31, 36, 41, 45, 49, 54, 59, 63, 67, 71, 75, 78, 81, 85, 90, 95, 99, 102, 105, 109, 113, 117, 121, 126, 131, 135, 139, 143, 147, 150, 153, 157, 161, 165, 168, 171, 175, 180, 185, 189, 192, 195, 199, 203, 207, 211, 216, 221, 225, 228, 231, 235
Offset: 1
Keywords
Examples
a(1) = 0 + 1 + 4 = 5; a(2) = 1 + 4 + 6 = 11; a(3) = 4 + 6 + 8 = 18.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..5000
Programs
-
Maple
A002808 := proc(n) option remember; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; fi; od: fi; end: A141468 := proc(n) if n <= 2 then n-1 ; else A002808(n-2) ; fi; end: A166039 := proc(n) add(A141468(j),j=n..n+2) ; end: seq(A166039(n),n=1..120) ; # R. J. Mathar, Oct 10 2009
-
Mathematica
With[{nn=100},Total/@Partition[Complement[Range[0,nn],Prime[ Range[ PrimePi[ nn]]]],3,1]] (* Harvey P. Dale, Aug 05 2015 *)