OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
EXAMPLE
0 -> 11 -> 220 -> 33 -> 220 -> ... and a number is repeated at step 4, so a(0)=3.
1 -> 110 -> 231 -> 231 -> 231 -> ..., so a(1) = 2.
22 -> 22 -> 22 -> ... is a fixed point, so a(22) = 0.
MAPLE
# using Maple procedure A308006 from that sequence
f:= proc(n) local t, S, i;
S:= {n};
t:= n;
do
t:= A308005(t);
if member(t, S) then return nops(S)-1 fi;
S:= S union {t};
od
end proc:
map(f, [$0..100]); # Robert Israel, May 14 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, May 12 2019
STATUS
approved