%I M0189 #20 Feb 03 2022 11:17:13
%S 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,
%T 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,
%U 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
%N Limit of the image of n after 2k iterates of `(3x+1)/2' map as k grows.
%C The map is x -> (3x+1)/2 for odd x, and x -> x/2 for even x.
%D R. K. Guy, Unsolved Problems in Number Theory, E16.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H J. C. Lagarias, <a href="http://www.cecm.sfu.ca/organics/papers/lagarias/paper/html/paper.html">The 3x+1 problem and its generalizations</a>, Amer. Math. Monthly, 92 (1985), 3-23.
%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%o (PARI) f(n) = if (n%2, (3*n+1)/2, n/2); \\ A014682
%o a(n) = my(last = n); while (1, my(new = f(f(last))); if (new == last, return(new)); last = new;); \\ _Michel Marcus_, Feb 03 2022
%Y Cf. A014682.
%K nonn
%O 1,2
%A _N. J. A. Sloane_.
%E More terms from _Max Alekseyev_, Oct 14 2012
|