login
Start with first run [1,2] then, for n >= 2, the n-th run is a(n) times [a(1),...,a(n-1)].
2

%I #20 Mar 14 2015 11:42:26

%S 1,2,1,1,1,2,1,2,1,1,2,1,1,1,2,1,1,1,1,2,1,1,1,1,2,1,1,1,2,1,2,1,1,1,

%T 2,1,1,2,1,1,1,2,1,1,2,1,1,1,2,1,2,1,2,1,1,1,2,1,2,1,1,2,1,1,1,2,1,2,

%U 1,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,1,2,1,2,1,1,2,1,2,1,1,1,2,1,2,1

%N Start with first run [1,2] then, for n >= 2, the n-th run is a(n) times [a(1),...,a(n-1)].

%C What is the density of 1's in the sequence (it seems it is >0.7 see A206767 )? The length of the n-th run also appears to behave like c*n^2 with c=0.64...(see A205883).

%e First run is given by 12 so a(2)=2 and the second run is 2 times a(1)=1 and we get 1211. Next a(3)=1 hence the third run is 1 time [a(1),a(2)]=12 and we get 121112. a(4)=1 hence 4th run is 1 time 121 and we get 121112121 etc.

%o (PARI) /* compute 6555 terms: */

%o v=[1,2];for(n=2,100,v=if(v[n]-2,concat(v,vector(n-1,i,v[i])),concat(concat(v,vector(n-1,i,v[i])),vector(n-1,i,v[i]))));a(n)=v[n]

%Y Cf. A205883, A206767.

%K nonn

%O 1,2

%A _Benoit Cloitre_, Jan 10 2013