login
A081613
Length of iteration list when Collatz-function is iterated with initial value n!=A000142[n].
0
1, 1, 2, 9, 11, 21, 21, 42, 45, 87, 67, 148, 211, 176, 265, 256, 260, 427, 426, 363, 388, 501, 490, 448, 450, 390, 560, 420, 518, 634, 445, 530, 535, 796, 951, 827, 814, 1070, 690, 729, 786, 910, 820, 1014, 1172, 1219, 997, 1328, 1331, 892, 1296
OFFSET
0,3
FORMULA
a(n)=A008908(A000142(n))
EXAMPLE
n = 6: list = {720, 360, 180, 90, 45, 136, 68, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1 }
MATHEMATICA
f[x_] := (1-Mod[x, 2])*(x/2)+(Mod[x, 2])*(3*x+1) f[1]=1; f0[x_] := FixedPointList[f, x] le[x_] := Length[FixedPointList[f, x]]-1 Table[le[w! ], {w, 1, 50}]
Table[Length[NestWhileList[If[EvenQ[#], #/2, 3#+1]&, n!, #!=1&]], {n, 0, 50}] (* Harvey P. Dale, Apr 08 2012 *)
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 17 2003
STATUS
approved