This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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. 1
 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, 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, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
 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 Cf. A308005. Sequence in context: A245219 A097509 A095206 * A049071 A168330 A176059 Adjacent sequences:  A308003 A308004 A308005 * A308007 A308008 A308009 KEYWORD nonn,base AUTHOR N. J. A. Sloane, May 12 2019 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 17 04:26 EDT 2019. Contains 324183 sequences. (Running on oeis4.)