%I #12 Jun 13 2018 09:11:10
%S 0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,
%T 1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,1,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,0,1,
%U 0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0
%N The limit of the string "0, 1" under the operation 'append first k terms, k=k+2' with k=1 initially.
%C An infinite binary word.
%C b(n) = sum of the first 10^n terms begins: 0, 3, 35, 342, 3425, 33759, 343464, 3447277, 34183683, 338743553, 3382195010.
%H Robert Israel, <a href="/A215531/b215531.txt">Table of n, a(n) for n = 0..9999</a>
%e 01 -> 010 -> 010 010 -> 010010 01001 -> 01001001001 0100100 etc.
%p S:= "01": k:= 1:
%p for i from 1 to 10 do
%p S:= cat(S,S[1..k]);
%p k:= k+2;
%p od:
%p seq(parse(S[i]),i=1..length(S)); # _Robert Israel_, Jun 12 2018
%o (Python)
%o TOP = 1000
%o a = [0]*TOP
%o a[1] = 1
%o n = 2
%o k = 1
%o while n+k < TOP:
%o a[n:] = a[:k]
%o n += k
%o k += 2
%o for k in range(n):
%o print a[k],
%Y Cf. A094186, A215532, A215530.
%K nonn,easy
%O 0
%A _Alex Ratushnyak_, Aug 15 2012
|