A087226 LCM of terms in Collatz (3x+1) function initiated at n.
1, 2, 240, 4, 80, 240, 1361360, 8, 12252240, 80, 194480, 240, 1040, 1361360, 4095840, 16, 17680, 12252240, 107158480, 80, 1344, 194480, 1365280, 240, 535792400, 1040, 44841486948146266934850832405421294927083491752830032389039800908293040266400
Offset: 1
Keywords
Examples
n=9: list={9,28,14,7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1}; LCM = 2*2*2*2*3*3*5*7*11*13*17 = 12252240.
Links
Programs
-
Haskell
a087226 = foldl1 lcm . a070165_row -- Reinhard Zumkeller, May 16 2013
-
Mathematica
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}] Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[LCM @@ Collatz[n], {n, 27}] (* T. D. Noe, May 15 2013 *)