A223700 The maximum value of the Collatz (3x+1) iteration beginning at A223699(n).
1, 2, 4, 8, 16, 32, 64, 20, 40, 80, 160, 52, 96, 208, 68, 136, 280, 88, 184, 56, 112, 232, 72, 148, 304, 100, 196, 400, 808, 260, 520, 1048, 13120, 4372, 9232, 472, 916, 1888, 628, 1264, 2536, 4912, 1672, 3256, 39364, 2248, 740, 1480, 2968, 5992, 1972, 3844
Offset: 1
Keywords
Examples
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.
Links
- T. D. Noe, Table of n, a(n) for n = 1..800
Programs
-
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