The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A003124 One of the basic cycles in the x->3x-1 (x odd) or x/2 (x even) problem. 3
17, 50, 25, 74, 37, 110, 55, 164, 82, 41, 122, 61, 182, 91, 272, 136, 68, 34, 17, 50, 25, 74, 37, 110, 55, 164, 82, 41, 122, 61, 182, 91, 272, 136, 68, 34, 17, 50, 25, 74, 37, 110, 55, 164, 82, 41, 122, 61, 182, 91, 272, 136, 68, 34 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
REFERENCES
Richard K. Guy, Unsolved Problems in Number Theory, E16.
H.-O. Peitgen et al., Chaos and Fractals, Springer, p. 33.
LINKS
EXAMPLE
17 is odd, so the next term is 3 * 17 - 1 = 50.
50 is even, so the next term is 50/2 = 25.
MATHEMATICA
Abs[NestList[If[EvenQ[#], #/2, 3# + 1]&, -17, 100]] (* Alonso del Arte, May 19 2015 *)
PROG
(PARI) a=34; A003124=vector(100, i, a=if(bittest(a, 0), 3*a-1, a/2)) \\ M. F. Hasler, Aug 29 2015
(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
CROSSREFS
Sequence in context: A146461 A098329 A160076 * A005570 A195037 A214660
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

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 May 31 19:33 EDT 2024. Contains 373003 sequences. (Running on oeis4.)