OFFSET
1,2
COMMENTS
a(n) = (n-1)-th nonprimes + (n-1)-th composites for n >= 2. a(n) = A018252(n-1) + A002808(n-1) for n >= 2. - Jaroslav Krizek, Dec 13 2009
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 0 + 1 = 1;
a(2) = 1 + 4 = 5;
a(3) = 4 + 6 = 11.
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: A166037 := proc(n) A141468(n)+A141468(n+1) ; end: seq(A166037(n), n=1..120) ; # R. J. Mathar, Oct 10 2009
MATHEMATICA
With[{nn=100}, Join[{1}, Total/@Partition[Complement[Range[nn], Prime[ Range[ PrimePi[ nn]]]], 2, 1]]] (* Harvey P. Dale, Aug 03 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Oct 05 2009
STATUS
approved