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 A316831 #17 Jan 24 2020 01:00:15 %S A316831 0,1,2,1,1,3,2,1,2,1,3,3,1,3,2,1,1,3,2,1,3,3,3,3,2,1,3,3,1,3,2,1,2,1, %T A316831 3,3,1,3,2,1,3,3,3,3,3,3,3,3,1,3,2,1,3,3,3,3,2,1,3,3,1,3,2,1,1,3,2,1, %U A316831 3,3,3,3,2,1,3,3,1,3 %N A316831 Trajectory of 0 under repeated application of the morphism 0 -> 01, 1 -> 21, 2 -> 13, 3 -> 33. %H A316831 Robert Israel, <a href="/A316831/b316831.txt">Table of n, a(n) for n = 0..10000</a> %H A316831 A. Cobham, <a href="https://doi.org/10.1109/SWAT.1968.20">On the Hartmanis-Stearns problem for a class of tag machines</a>, 9th Annual Symposium on Switching and Automata Theory (SWAT 1968)(FOCS), pp. 51-60, 1968; doi:10.1109/SWAT.1968.20. See Example 7. %p A316831 f(0):= (0,1): %p A316831 f(1):= (2,1): %p A316831 f(2):= (1,3): %p A316831 f(3):= (3,3): %p A316831 A:= [0]: %p A316831 for i from 1 to 8 do A:= map(f, A) od: %p A316831 A; # _Robert Israel_, Jul 18 2018 %t A316831 Nest[ Flatten[# /. {0 -> {0, 1}, 1 -> {2, 1}, 2 -> {1, 3}, 3 -> {3, 3}}] &, {0}, 7] (* _Robert G. Wilson v_, Jul 18 2018 *) %Y A316831 Cf. A086747, A316832. %K A316831 nonn %O A316831 0,3 %A A316831 _N. J. A. Sloane_, Jul 18 2018