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.
%I A293630 #59 Mar 28 2023 21:03:25 %S A293630 1,2,1,1,1,2,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,2,1,1,1,1,2,1,1,1,2,1,1,2, %T A293630 1,1,1,1,2,1,1,1,2,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,2,1,1,1,1,2,1,1,1,2, %U A293630 1,1,2,1,1,1,2,1,1,1,2,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,2,1,1,1,1,2 %N A293630 "Look to the left" sequence starting with (1, 2): when the sequence has n terms, extend it by appending a(n) copies of a(1..n-1). %C A293630 Stage 1: last term of 1,2 is 2 hence we add 2 copies of the block to the left of the last term (here 1) giving 1,2,1,1. %C A293630 Stage 2: last term of 1,2,1,1 is 1 hence we add one copy of the block to the left of the last term (here 1,2,1) giving 1,2,1,1,1,2,1. %C A293630 Stage 3: last term of 1,2,1,1,1,2,1 is 1 hence we add one copy of the block to the left of the last term (here 1,2,1,1,1,2) giving 1,2,1,1,1,2,1,1,2,1,1,1,2. %C A293630 Iterate the process. %H A293630 Iain Fox, <a href="/A293630/b293630.txt">Table of n, a(n) for n = 1..10369</a> %H A293630 Benoit Cloitre, <a href="/A293630/a293630.png">Plot of Sum_{k=1..n} a(k)/n</a> %F A293630 It seems that lim_{n->infinity} (a(1) + a(2) + ... + a(n))/n = 1.27526... (see link and A296564). %F A293630 Because of the previous statement, it seems that the ratio of 2s to 1s in this sequence is 1:2.6329... (see A297927). - _Iain Fox_, Oct 15 2017 %t A293630 f[s_List] := Block[{a = Flatten[s][[-1]], b = Most@ s}, s = Join[s, Flatten@ Table[b, {a}]]]; Nest[f, {1, 2}, 6] (* _Robert G. Wilson v_, Dec 23 2017 *) %o A293630 (PARI) v=[1,2];for(n=1,10,l=length(v);w=vector(l-1,i,v[i]);v=concat(v,if(v[l]-1,concat(w,w),w)));a(n)=v[n]; %Y A293630 "Look to the left" sequences: A322423 (seed 1,2,3), A322424 (seed 1,2,3,4), A322425 (seed 1,2,3,4,5). %Y A293630 Cf. A291481, A296564, A297927, A322426. %K A293630 nonn,nice %O A293630 1,2 %A A293630 _Benoit Cloitre_, Oct 14 2017 %E A293630 Self-contained name from _M. F. Hasler_, Dec 10 2018