cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A293811 "Look twice to the left" sequence starting with 1,2 (see comment).

This page as a plain text file.
%I A293811 #8 Oct 20 2017 14:32:17
%S A293811 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 A293811 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 A293811 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 A293811 "Look twice to the left" sequence starting with 1,2 (see comment).
%C A293811 Stage 0: we start from 1,2.
%C A293811 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 A293811 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 A293811 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 A293811 Iterate the process.
%t A293811 Nest[Join[#, Flatten@ ConstantArray[Take[#, Length@ # - 1], 2]] &, {1, 2}, 5] (* _Michael De Vlieger_, Oct 16 2017 *)
%o A293811 (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 A293811 Cf. A293630.
%K A293811 nonn
%O A293811 1,2
%A A293811 _Benoit Cloitre_, Oct 16 2017