Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 Oct 20 2017 14:32:17
%S 1,2,1,1,1,2,1,1,2,1,1,2,1,1,1,2,1,1,2,1,2,1,1,1,2,1,1,2,1,2,1,1,1,2,
%T 1,1,2,1,1,2,1,1,1,2,1,1,2,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,2,1,1,2,1,
%U 1,1,2,1,1,2,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,2,1,1,2,1,1,1,2,1,1
%N "Look twice to the left" sequence starting with 1,2 (see comment).
%C Stage 0: we start from 1,2.
%C Stage 1: we add 2 copies of the block to the left of the last term (here the block 1) giving 1,2,1,1.
%C Stage 2: we add 2 copies of the block to the left of the last term (here the block 1,2,1) giving 1,2,1,1,1,2,1,1,2,1.
%C Stage 3: we add 2 copies of the block to the left of the last term (here the block 1,2,1,1,1,2,1,1,2) giving 1,2,1,1,1,2,1,1,2,1,1,2,1,1,1,2,1,1,2,1,2,1,1,1,2,1,1,2.
%C Iterate the process.
%t Nest[Join[#, Flatten@ ConstantArray[Take[#, Length@ # - 1], 2]] &, {1, 2}, 5] (* _Michael De Vlieger_, Oct 16 2017 *)
%o (PARI) v=[1,2];for(n=1,10,l=length(v);w=vector(l-1,i,v[i]);v=concat(v,concat(w,w)));a(n)=v[n];
%Y Cf. A293630.
%K nonn
%O 1,2
%A _Benoit Cloitre_, Oct 16 2017