OFFSET
1,5
COMMENTS
Number of terms in s(n) is A114512(n).
EXAMPLE
s(1) = {0,0,1}, s(2) = {0,0,1,0,2}. s(3) = s(2) U s(a(3)) U {3} = {0,0,1,0,2} U {0,0,1} U {3} = {0,0,1,0,2,0,0,1,3}, which are the first 9 terms of this sequence.
MATHEMATICA
s[0] = {0}; s[n_] := s[n] = Flatten[{s[n - 1], s[s[n - 1][[n]]], {n}}]; s[19] (* Ray Chandler, Dec 05 2005 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Dec 03 2005
EXTENSIONS
Extended by Ray Chandler, Dec 05 2005
STATUS
approved