OFFSET
1,2
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
In parentheses the blocks of integers removed: 1 2 (3 4 5) 6 7 8 9 10 (11 12 13 14 15 16 17) 18 19 20 21 22 23 24 25 26 27 28 (29 30 ...).
MAPLE
L := [] ; p := 2 ; ptr := 1 ;
while p < 40 do
L := [op(L), seq(j, j=ptr..ptr+p-1)] ; ptr := ptr+p ; p := nextprime(p) ;
ptr := ptr+p ; p := nextprime(p) ;
end do:
L ; # R. J. Mathar, Feb 08 2011
MATHEMATICA
Module[{nn=20, t}, t=Total[Prime[Range[nn]]]; Take[TakeList[Range[t], Prime[ Range[nn]]], {1, nn, 2}]]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 04 2019 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Feb 02 2011
STATUS
approved