OFFSET
1,2
LINKS
T. D. Noe, Table of n, a(n) for n = 1..800
EXAMPLE
The Collatz iteration of 15 is {15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1}. The maximum is 160, which occurs at position 11, counting from the right. Hence, a(11) = 160 because no number smaller than 15 has its maximum value at the 11 position.
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; t= Table[c = Reverse[Collatz[n]]; Position[c, Max[c]][[1, 1]], {n, 10000}]; t3 = {}; n = 0; While[n++; p = Position[t, n, 1, 1]; p != {}, c = Collatz[p[[1, 1]]]; AppendTo[t3, Max[c]]]; t3
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 26 2013
STATUS
approved