OFFSET
2,2
LINKS
Robert Price, Table of n, a(n) for n = 2..10000
EXAMPLE
For n = 7, the sequence is: 7, 22, 11, 34, 17, *52*, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1. The highest value in the list (starred) is 52.
MATHEMATICA
Table[k = n; maxk = 0; While[k ≠ 1, If[EvenQ[k], k = k/2, k = 3*k + 1]; maxk = Max[maxk, k]]; maxk, {n, 2, 100}] (* Robert Price, Apr 11 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Douglas Boffey, Mar 19 2016
STATUS
approved