%I #18 Aug 31 2017 23:02:47
%S 1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,1,0,1,1,0,1,0,
%T 1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,
%U 0,1,0,1,1,0,1,0,1,0,1,1,0,1,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0
%N Let {s(i)}, i=0,1,2,... be a sequence of finite sequences with terms s(i)(j), j=1,2,3,... Start with s(0)={1}. Then, for k>0, let s(k)=s(k-1)Us(k-1) if s(k-1)(k)=0, s(k)=s(k-1)U{0}Us(k-1) if s(k-1)(k)=1, where s(i)(j) is the j-th element of s(i) and U denotes concatenation of the terms of the two operands. {a(n)} is the limit of s(k) as k goes to infinity.
%C Suggested by _Leroy Quet_, Jul 18 2004.
%C Note that this is not A137843(n) mod 2. The first difference is at n=14, where a(14) = 0, while A137843(14) = 5. - _Antti Karttunen_, Aug 31 2017
%e Let s(0) = {1}. Then
%e s(1) = s(0) U {0} U s(0) = {1,0,1}, since s(0)(1) = 1,
%e s(2) = s(2) U s(2) = {1,0,1,1,0,1}, since s(1)(2) = 0,
%e s(3) = s(2) U {0} U s(2) ={1,0,1,1,0,1,0,1,0,1,1,0,1}, since s(2)(3) = 1.
%e From _Antti Karttunen_, Aug 31 2017: (Start)
%e And since s(3)(4) = a(4) = 1, s(4) = s(3) U {0} s(3) = {1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1},
%e Note that because each stage is a prefix of the next (starts with the same terms), we may as well write a(n) instead of s(n-1)(n).
%e (End)
%Y Cf. A112306 (the length of each stage).
%Y Cf. A137843.
%K nonn
%O 1,1
%A _John W. Layman_, Jul 20 2004