OFFSET
1,2
COMMENTS
Start with 1 2 3 4 5 6 7 8 9 10 11 12 13...; sum of first and 2nd terms = 3; strike out every 3rd term: 1 2 4 5 7 8 10 11 13...; sum of 2nd and 3rd terms = 6; strike out every 6th term: 1 2 4 5 7 10 11 13...; sum of 3rd and 4th terms = 9; strike out every 9th number; etc.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..400
MATHEMATICA
Fold[ Delete[ #1, Thread[ List[ Rest[ Range[ 0, Length[ #1 ], #1[ [ #2 ] ]+#1[ [ #2+1 ] ] ] ] ] ] ]&, Range[ 200 ], Range[ 20 ] ]
PROG
(Haskell)
a039672 n = a039672_list !! (n-1)
a039672_list = sieve 1 [1..] where
sieve k xs = z : sieve (k + 1) (fLucky xs) where
z = xs !! (k - 1 )
fLucky ws = us ++ fLucky vs where
(us, _:vs) = splitAt (z + xs !! k - 1) ws
-- Reinhard Zumkeller, Dec 05 2011
CROSSREFS
KEYWORD
nice,nonn
AUTHOR
EXTENSIONS
Corrected by Larry Reeves (larryr(AT)acm.org), Feb 21 2001
STATUS
approved