The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A122563 Start at 2n+1, iterate the map x -> A337349(x); sequence gives the number of iterations to resulting cycle or -1 if the trajectory never cycles. 2
 0, 2, 1, 1, 2, 3, 2, 1, 0, 0, 1, 3, 2, 1, 1, 6, 3, 5, 2, 4, 4, 0, 3, 3, 8, 8, 2, 7, 1, 4, 0, 3, 6, 3, 1, 2, 5, 10, 1, 4, 10, 7, 1, 9, 3, 9, 3, 8, 0, 8, 2, 2, 5, 7, 0, 7, 7, 7, 1, 4, 1, 2, 6, 6, 6, 9, 3, 1, 2, 5, 5, 5, 5, 8, 2, 2, 1, 10, 4, 16, 4, 4, 4, 4, 9, 6, 1, 9, 3, 15, 3, 3, 3, 6, 3, 3, 2, 8, 8, 2, 8, 14 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS Iteration: multiply by 3 and add 1 and divide out any power of 2; then multiply by 3 and subtract 1 and divide out any power of 2. When a(x) is iterated, what are the limit cycles? Are there any besides {1} and {17 -> 19 -> 43 -> 97 -> 109 -> 61}? LINKS Ray Chandler, Table of n, a(n) for n = 0..10000 EXAMPLE The iteration for n=13 is 27->61->17->19->43->97->109->61->... and a(13)=1 step was needed to enter the cycle (at 61). The iteration for n=30 is 61-> 17->19->43->97->109->61->> and the cycle was already entered at the start, so a(30)=0. MAPLE A122563 := proc(n)     local cyc, itr, x ;     cyc := [] ;     x := 2*n+1 ;     while true do         cyc := [op(cyc), x] ;         x := A337349(x) ;         if x in cyc then             break ;         end if;     end do:     member(x, cyc, 'itr') ;     itr -1 ; end proc: seq(A122563(n), n=0..101) ; # R. J. Mathar, Aug 26 2020 MATHEMATICA nextx[x_Integer] := Block[{a = x}, a = 3 a + 1; While[EvenQ@a, a /= 2]; a = 3 a - 1; While[EvenQ@a, a /= 2]; a]; f[n_] := Length@NestWhileList[nextx, n, FreeQ[{1, 17, 19, 43, 97, 109, 61}, #] &] - 1; Table[f[2 n + 1], {n, 0, 101}] (* original program from author corrected as suggested by William P. Orrick, Ray Chandler, Aug 28 2020 *) CROSSREFS Cf. A102421, A102423, A337349. Sequence in context: A063740 A072782 A337014 * A204030 A234503 A333267 Adjacent sequences:  A122560 A122561 A122562 * A122564 A122565 A122566 KEYWORD nonn,look AUTHOR Robert G. Wilson v, based on email from Dan Asimov (dasimov(AT)earthlink.net), Sep 20 2006 EXTENSIONS a(13), a(30),... corrected. - R. J. Mathar, Aug 26 2020 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 January 24 00:51 EST 2021. Contains 340398 sequences. (Running on oeis4.)