login
A006513
Limit of the image of n after 2k iterates of `(3x+1)/2' map as k grows.
(Formerly M0189)
4
1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
1,2
COMMENTS
The map is x -> (3x+1)/2 for odd x, and x -> x/2 for even x.
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, E16.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
PROG
(PARI) f(n) = if (n%2, (3*n+1)/2, n/2); \\ A014682
a(n) = my(last = n); while (1, my(new = f(f(last))); if (new == last, return(new)); last = new; ); \\ Michel Marcus, Feb 03 2022
CROSSREFS
Cf. A014682.
Sequence in context: A324381 A331383 A201208 * A105224 A261627 A237112
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Max Alekseyev, Oct 14 2012
STATUS
approved