login
LCM of terms in Collatz (3x+1) function initiated at n.
6

%I #13 Sep 04 2017 18:08:58

%S 1,2,240,4,80,240,1361360,8,12252240,80,194480,240,1040,1361360,

%T 4095840,16,17680,12252240,107158480,80,1344,194480,1365280,240,

%U 535792400,1040,44841486948146266934850832405421294927083491752830032389039800908293040266400

%N LCM of terms in Collatz (3x+1) function initiated at n.

%H Reinhard Zumkeller, <a href="/A087226/b087226.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%H <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>

%e n=9: list={9,28,14,7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1};

%e LCM = 2*2*2*2*3*3*5*7*11*13*17 = 12252240.

%t c[x_] := (1-Mod[x, 2])*(x/2)+Mod[x, 2]*(3*x+1); c[1]=1; fpl[x_] := Delete[FixedPointList[c, x], -1] Table[Apply[LCM, fpl[w]], {w, 1, 32}]

%t Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[LCM @@ Collatz[n], {n, 27}] (* _T. D. Noe_, May 15 2013 *)

%o (Haskell)

%o a087226 = foldl1 lcm . a070165_row -- _Reinhard Zumkeller_, May 16 2013

%Y Cf. A006370.

%Y Cf. A070165, A225784.

%K nonn

%O 1,2

%A _Labos Elemer_, Aug 28 2003