A348136 Irregular triangle read by rows T(n,k) in which row n lists the first digit of every term of the trajectory of n in Collatz problem including the trajectory [1, 4, 2, 1] for n = 1.
1, 4, 2, 1, 2, 1, 3, 1, 5, 1, 8, 4, 2, 1, 4, 2, 1, 5, 1, 8, 4, 2, 1, 6, 3, 1, 5, 1, 8, 4, 2, 1, 7, 2, 1, 3, 1, 5, 2, 1, 4, 2, 1, 5, 1, 8, 4, 2, 1, 8, 4, 2, 1, 9, 2, 1, 7, 2, 1, 3, 1, 5, 2, 1, 4, 2, 1, 5, 1, 8, 4, 2, 1, 1, 5, 1, 8, 4, 2, 1, 1, 3, 1, 5, 2, 1, 4, 2, 1, 5, 1, 8, 4, 2, 1, 1, 6, 3, 1, 5, 1, 8, 4, 2, 1
Offset: 1
Examples
Triangle begins: 1,4,2,1; 2,1; 3,1,5,1,8,4,2,1; 4,2,1; 5,1,8,4,2,1; 6,3,1,5,1,8,4,2,1; 7,2,1,3,1,5,2,1,4,2,1,5,1,8,4,2,1; 8,4,2,1; 9,2,1,7,2,1,3,1,5,2,1,4,2,1,5,1,8,4,2,1; 1,5,1,8,4,2,1; 1,3,1,5,2,1,4,2,1,5,1,8,4,2,1; 1,6,3,1,5,1,8,4,2,1; 1,4,2,1,5,1,8,4,2,1; 1,7,2,1,3,1,5,2,1,4,2,1,5,1,8,4,2,1; ...
Links
Crossrefs
Programs
-
Mathematica
Prepend[Map[First@ IntegerDigits[#] &, Array[NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, #, # > 1 &] &, 11, 2], {2}], NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, 1, # > 1 &, {2, 1}]] // Flatten (* Michael De Vlieger, Oct 27 2021 *)