A222297 Irregular triangle of numbers first appearing in the Collatz (3x+1) iteration of n.
1, 2, 3, 4, 5, 8, 10, 16, 6, 7, 11, 13, 17, 20, 22, 26, 34, 40, 52, 9, 14, 28, 12, 15, 23, 35, 46, 53, 70, 80, 106, 160, 18, 19, 29, 44, 58, 88, 21, 32, 64, 24, 25, 38, 76, 27, 31, 41, 47, 61, 62, 71, 82, 91, 92, 94, 103, 107, 121, 122, 124, 137, 142, 155, 161
Offset: 1
Examples
The irregular table begins {1}, {2}, {3, 4, 5, 8, 10, 16}, {}, {}, {6}, {7, 11, 13, 17, 20, 22, 26, 34, 40, 52}, {}, {9, 14, 28}, {}, {}, {12}, {}, {}, {15, 23, 35, 46, 53, 70, 80, 106, 160}
Links
Crossrefs
Cf. A222118.
Programs
-
Mathematica
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; found = {}; t = Table[c = Collatz[n]; r = Complement[c, found]; found = Union[found, c]; r, {n, 27}]; Flatten[t]
Comments