%I #29 Apr 11 2021 04:24:09
%S 0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,1,0,1,0,0,
%T 1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,
%U 0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,0,1,0,0,1,0,1,0,0,1,0,0
%N Taking a(1)=0 and a(2)=1, sequence (a(n))n>1 is defined as follows : letting w(k)=a(1)a(2)...a(k) and w(infinity)= limit k ->infinity a(1)a(2)w(1)w(2)...w(k) we have w(infinity)=a(1)a(2)a(3)a(4)...
%C An infinite binary word.
%C A shorter definition: the limit of the string "0, 1" under the operation 'append first k terms, increment k' with k=1 initially.
%C Sums of the first 10^n terms are: 0, 4, 36, 358, 3576, 34908, 356258, 3621799, 35807401, 352047694, 3495167093. [_Alex Ratushnyak_, Aug 15 2012]
%H Robert Israel, <a href="/A094186/b094186.txt">Table of n, a(n) for n = 1..10000</a>
%F It seems that limit n ->infinity 1/n*sum(k=1, n, a(k)) = 0.34...
%e w(1)=0, w(2)=01, therefore a(1)a(2)w(1)w(2)=01001=a(1)a(2)a(3)a(4)a(5) and sequence begins : 0,1,0,0,1,...
%p S:= "01":
%p for k from 1 to 40 do
%p A:= cat(A,A[1..k])
%p od:
%p seq(parse(A[i]),i=1..length(A)); # _Robert Israel_, Mar 28 2019
%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 += 1
%o for k in range(n):
%o print(a[k], end=", ")
%o # _Alex Ratushnyak_, Aug 15 2012
%Y Cf. A164349, A215531, A215532.
%K nonn
%O 1,1
%A _Benoit Cloitre_, May 07 2004