login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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

%I #10 May 14 2019 08:57:15

%S 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 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 1,2,2,2,2,2,2,2,2,2,2,2,1,2,1,2,1

%N 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 Robert Israel, <a href="/A308006/b308006.txt">Table of n, a(n) for n = 0..10000</a>

%e 0 -> 11 -> 220 -> 33 -> 220 -> ... and a number is repeated at step 4, so a(0)=3.

%e 1 -> 110 -> 231 -> 231 -> 231 -> ..., so a(1) = 2.

%e 22 -> 22 -> 22 -> ... is a fixed point, so a(22) = 0.

%p # using Maple procedure A308006 from that sequence

%p f:= proc(n) local t,S,i;

%p S:= {n};

%p t:= n;

%p do

%p t:= A308005(t);

%p if member(t,S) then return nops(S)-1 fi;

%p S:= S union {t};

%p od

%p end proc:

%p map(f, [$0..100]); # _Robert Israel_, May 14 2019

%Y Cf. A308005.

%K nonn,base

%O 0,1

%A _N. J. A. Sloane_, May 12 2019

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)