OFFSET
1,2
COMMENTS
The length of the trajectory of a(n) is A220140(n).
LINKS
T. D. Noe, Table of n, a(n) for n = 1..500
EXAMPLE
The Collatz trajectory of 2 + 1 is (3, 10, 5, 16, 8, 4, 2, 1). Hence, a(3) = 16. The trajectory of 16 + 1 is (17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1). Hence, a(4) = 52.
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; c = {1}; t = {}; Do[AppendTo[t, Max[c]]; c = Collatz[t[[-1]] + 1], {30}]; t
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Jan 02 2013
STATUS
approved