%I #13 Mar 28 2020 15:09:02
%S 0,0,1,0,2,0,0,1,3,0,4,0,0,1,0,2,5,0,6,0,7,0,0,1,8,0,0,1,0,2,0,0,1,3,
%T 9,0,10,0,0,1,0,2,0,0,1,3,0,4,11,0,12,0,13,0,0,1,14,0,15,0,0,1,0,2,16,
%U 0,0,1,0,2,0,0,1,3,0,4,0,0,1,0,2,5,17,0,18,0,0,1,0,2,0,0,1,3,0,4,0,0,1,0
%N a(1) = 0. s(0) = {0}. s(n) = s(n-1) U s(a(n)) U {n}, where U represents a concatenation of finite sequences. The sequence {a(n)} is the limit of s(m) as m -> infinity.
%C Number of terms in s(n) is A114512(n).
%e 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.
%t s[0] = {0}; s[n_] := s[n] = Flatten[{s[n - 1], s[s[n - 1][[n]]], {n}}]; s[19] (* _Ray Chandler_, Dec 05 2005 *)
%Y Cf. A114511, A114512.
%K easy,nonn
%O 1,5
%A _Leroy Quet_, Dec 03 2005
%E Extended by _Ray Chandler_, Dec 05 2005