OFFSET
1,2
COMMENTS
1 together with the sum of consecutive composites between primes interleaved with the primes. - Omar E. Pol, Oct 01 2012
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
Contribution from Omar E. Pol, Oct 06 2012 (Start):
a(1) = 1, by definition. Also 1 is the first nonprime.
a(2) = 2, the first prime.
a(3) = 0, the sum of composite numbers between 2 and 3.
a(4) = 3, the second prime.
a(5) = 4, the sum of the composite numbers between 3 and 5.
a(6) = 5, the third prime.
a(7) = 6, the sum of the composite numbers between 5 and 7.
a(8) = 7, the fourth prime.
a(9) = 27, the sum of the composite numbers between 7 and 11, since 8+9+10 = 27.
a(10) = 11, the fifth prime.
(End)
MATHEMATICA
Join[{1}, With[{nn=40}, Riffle[Prime[Range[nn]], Table[Total[Range[Prime[n]+1, Prime[n+1]-1]], {n, nn}]]]] (* Harvey P. Dale, Jul 16 2023 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Jul 16 2005
EXTENSIONS
More terms from David Wasserman, Aug 15 2005
STATUS
approved