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 A214640 #18 Nov 04 2020 05:55:59 %S A214640 1,2,3,1,2,2,1,2,3,1,2,1,2,1,2,3,1,2,2,1,2,3,1,2,1,2,3,1,2,1,2,3,1,2, %T A214640 2,1,2,3,1,2,1,2,1,2,3,1,2,2,1,2,3,1,2,1,2,3,1,2,2,1,2,3,1,2,1,2,3,1, %U A214640 2,2,1,2,3,1,2,1,2,1,2,3,1,2,2,1,2,3,1,2,1,2,3,1,2,1,2,3,1,2,2,1,2,3,1,2,1,2,1,2,3,1,2,2,1,2,3,1,2 %N A214640 A ternary sequence : closed under 1 -> 123, 2 -> 12, 3 -> 2 . Start with 1 . %H A214640 Alois P. Heinz, <a href="/A214640/b214640.txt">Table of n, a(n) for n = 1..10000</a> %e A214640 Start: 1 %e A214640 Rules: %e A214640 1 --> 123 %e A214640 2 --> 12 %e A214640 3 --> 2 %e A214640 ------------- %e A214640 0: (#=1) %e A214640 1 %e A214640 1: (#=3) %e A214640 123 %e A214640 2: (#=6) %e A214640 123122 %e A214640 3: (#=13) %e A214640 1231221231212 %e A214640 4: (#=29) %e A214640 12312212312121231221231212312 %e A214640 5: (#=64) %e A214640 1231221231212123122123121231212312212312121231221231212312212312 %p A214640 S:= proc(n) option remember; `if`(n=0, [1], subs(x=[1, 2, 3][], %p A214640 y=[1, 2][], z=2, subs(1=x, 2=y, 3=z, S(n-1)))) %p A214640 end: %p A214640 a:= proc(n) local k; %p A214640 for k while nops(S(k))<n do od; S(k)[n] %p A214640 end: %p A214640 seq(a(n), n=1..100); # _Alois P. Heinz_, Jul 28 2012 %t A214640 SubstitutionSystem[{1 -> {1, 2, 3}, 2 -> {1, 2}, 3 -> {2}}, {1}, 6] // Last (* _Jean-François Alcover_, Nov 04 2020 *) %Y A214640 Cf. A214260, A214641, A214642, A214644. %K A214640 nonn,easy %O A214640 1,2 %A A214640 _Philippe Deléham_, Jul 23 2012