OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; Table[ Sum[ Composite[i], {i, n(n - 1)/2 + 1, n(n + 1)/2}], {n, 1, 42}]
With[{terms=50}, cnos=With[{c=(terms(terms+1)(terms+2))/6}, Complement[ Range[5, c], Prime[Range[PrimePi[c]]]]]; Join[{4}, Total/@Table[Take[ cnos, {n (n+1)/2, (n+1) (n+2)/2-1}], {n, terms-1}]]] (* Harvey P. Dale, Oct 10 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 20 2002
EXTENSIONS
More terms from Jim Nastos and Robert G. Wilson v, Jun 21 2002
STATUS
approved