A293811 "Look twice to the left" sequence starting with 1,2 (see comment).
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, 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, 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
Offset: 1
Keywords
Crossrefs
Cf. A293630.
Programs
-
Mathematica
Nest[Join[#, Flatten@ ConstantArray[Take[#, Length@ # - 1], 2]] &, {1, 2}, 5] (* Michael De Vlieger, Oct 16 2017 *)
-
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];
Comments