OFFSET
1,2
COMMENTS
MATHEMATICA
Collatz[n_] := NestWhileList[ If[ OddQ@#, 3# +1, #/2] &, n, # > 1 &]; f[n_] := Block[{x = Length[ SplitBy[ Collatz@n, # < n + 1 &]] - 1}, If[ OddQ@ n && n > 1, x - 1, x]]; mx = -1; k = 1; lst = {}; While[k < 5000001, If[ f@ k > mx, mx = f@ k; AppendTo[lst, k]]; k++]; lst
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Sep 26 2018
STATUS
approved