OFFSET
1,3
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
Collatz trajectory of 5 is 5, 16, 8, 4, 2, 1. Hence, a(5) = 4.
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[c = Collatz[n]; Length[c] - Position[c, Max[c]][[1, 1]], {n, 100}] (* T. D. Noe, Feb 27 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jayanta Basu, Feb 27 2013
STATUS
approved