OFFSET
0,2
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
EXAMPLE
n=2: initial value=3^2, list of iterates is {9,28,14,7,22,11,34,17,52,26,13,50,20,10,5,16,8,4,2,1} length=a(2)=20; Observe that consecutive powers of 3 as arguments frequently provide iteration-lengths of consecutive integers, for instance n=10,11,12,13 give L=136,135,134,133 or n=88-96 result in L=1278-1271.
MATHEMATICA
f[x_] := (1-Mod[x, 2])*(x/2)+(Mod[x, 2])*(3*x+1); f[1]=1; Table[1+Length[FixedPointList[f, 3^w]], {w, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Sep 19 2002
STATUS
approved