cp's OEIS Frontend

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.

A003124 One of the basic cycles in the x->3x-1 (x odd) or x/2 (x even) problem.

This page as a plain text file.
%I A003124 #21 Oct 20 2023 22:42:22
%S A003124 17,50,25,74,37,110,55,164,82,41,122,61,182,91,272,136,68,34,17,50,25,
%T A003124 74,37,110,55,164,82,41,122,61,182,91,272,136,68,34,17,50,25,74,37,
%U A003124 110,55,164,82,41,122,61,182,91,272,136,68,34
%N A003124 One of the basic cycles in the x->3x-1 (x odd) or x/2 (x even) problem.
%D A003124 Richard K. Guy, Unsolved Problems in Number Theory, E16.
%D A003124 H.-O. Peitgen et al., Chaos and Fractals, Springer, p. 33.
%e A003124 17 is odd, so the next term is 3 * 17 - 1 = 50.
%e A003124 50 is even, so the next term is 50/2 = 25.
%t A003124 Abs[NestList[If[EvenQ[#], #/2, 3# + 1]&, -17, 100]] (* _Alonso del Arte_, May 19 2015 *)
%o A003124 (PARI) a=34;A003124=vector(100,i,a=if(bittest(a,0),3*a-1,a/2)) \\ _M. F. Hasler_, Aug 29 2015
%o A003124 (PARI) A003124(n,a=17)={for(i=1,n%17,a=if(bittest(a,0),3*a-1,a\2));a} \\ _M. F. Hasler_, Aug 29 2015
%K A003124 nonn,easy
%O A003124 0,1
%A A003124 _N. J. A. Sloane_