login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Table of n, a(n) for n=0..53.

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

Adjacent sequences:  A003121 A003122 A003123 * A003125 A003126 A003127

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane.

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 27 15:14 EST 2020. Contains 331295 sequences. (Running on oeis4.)