OFFSET
1,2
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n = 1..300
EXAMPLE
The Collatz iteration of 5 is {5, 16, 8, 4, 2, 1}, which has length 6. The maximum occurs at the second position. Note that 2/6 = 1/3. No number less than 5 has this property. Hence a(3) = 5.
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 50; t = Table[0, {nn}]; t[[1]] = 1; n = 1; While[Times @@ t == 0, n = n + 2; c = Collatz[n]; frac = Position[c, Max[c]][[1, 1]]/Length[c]; numer = Numerator[frac]; denom = Denominator[frac]; If[numer == 1 && denom <= nn && t[[denom]] == 0, t[[denom]] = n]]; t
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Apr 23 2013
STATUS
approved