%I #33 Dec 12 2023 07:47:37
%S 1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,
%T 2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,
%U 4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4
%N Trajectory of 1 under repeated application of the map in A185452.
%C Periodic with period length 5.
%D J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010; see page 88.
%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,1).
%F G.f.: -x*(1+3*x+8*x^2+4*x^3+2*x^4) / ( (x-1)*(x^4+x^3+x^2+x+1) ). - _R. J. Mathar_, Mar 11 2011
%p f:=n->if n mod 2 = 0 then n/2 else (5*n+1)/2; fi;
%p T:=proc(n,M) global f; local t1,i; t1:=[n];
%p for i from 1 to M-1 do t1:=[op(t1),f(t1[nops(t1)])]; od: t1; end;
%p T(1,120);
%t NestList[If[EvenQ[#],#/2,(5#+1)/2]&,1,110] (* _Harvey P. Dale_, Jun 24 2011 *)
%Y Cf. A185452, A185454, A185455.
%K nonn
%O 1,2
%A _N. J. A. Sloane_, Feb 04 2011