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 A308006 #10 May 14 2019 08:57:15 %S A308006 3,2,3,2,3,2,3,2,3,2,2,2,2,2,2,2,2,2,2,2,1,2,0,2,1,2,1,2,1,2,2,2,2,1, %T A308006 2,2,2,2,2,2,1,2,1,2,1,2,1,2,1,2,2,2,2,2,2,2,2,2,2,2,1,2,1,2,1,2,1,2, %U A308006 1,2,2,2,2,2,2,2,2,2,2,2,1,2,1,2,1 %N A308006 Iterate the map x->A308005(x) starting at x=n; a(n) is the number of steps before the first repeated term is encountered. %H A308006 Robert Israel, <a href="/A308006/b308006.txt">Table of n, a(n) for n = 0..10000</a> %e A308006 0 -> 11 -> 220 -> 33 -> 220 -> ... and a number is repeated at step 4, so a(0)=3. %e A308006 1 -> 110 -> 231 -> 231 -> 231 -> ..., so a(1) = 2. %e A308006 22 -> 22 -> 22 -> ... is a fixed point, so a(22) = 0. %p A308006 # using Maple procedure A308006 from that sequence %p A308006 f:= proc(n) local t,S,i; %p A308006 S:= {n}; %p A308006 t:= n; %p A308006 do %p A308006 t:= A308005(t); %p A308006 if member(t,S) then return nops(S)-1 fi; %p A308006 S:= S union {t}; %p A308006 od %p A308006 end proc: %p A308006 map(f, [$0..100]); # _Robert Israel_, May 14 2019 %Y A308006 Cf. A308005. %K A308006 nonn,base %O A308006 0,1 %A A308006 _N. J. A. Sloane_, May 12 2019