A375888 Rectangular array: row n shows all k such that n is the number of rises in the trajectory of k in the Collatz problem.
1, 2, 5, 4, 10, 3, 8, 20, 6, 17, 16, 21, 12, 34, 11, 32, 40, 13, 35, 22, 7, 64, 42, 24, 68, 23, 14, 9, 128, 80, 26, 69, 44, 15, 18, 25, 256, 84, 48, 70, 45, 28, 19, 49, 33, 512, 85, 52, 75, 46, 29, 36, 50, 65, 43, 1024, 160, 53, 136, 88, 30, 37, 51, 66, 86, 57
Offset: 0
Examples
Corner: 1 2 4 8 16 32 64 128 256 512 1024 5 10 20 21 40 42 80 84 85 160 168 3 6 12 13 24 26 48 52 53 96 104 17 34 35 68 69 70 75 136 138 140 141 11 22 23 44 45 46 88 90 92 93 176 7 14 15 28 29 30 56 58 60 61 112 9 18 19 36 37 38 72 74 76 77 81 6 is in row 2 because the trajectory, (6, 3, 10, 5, 16, 4, 2, 1), has exactly 2 rises: 3 to 10, and 5 to 16.
Programs
-
Mathematica
t = Table[Count[Differences[NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]], ? Positive], {n, 2048}]; (* after _Harvey P. Dale, A006667 *) r[n_] := Flatten[Position[t, n - 1]]; Column[Table[r[n], {n, 1, 21}]] (* array *) u = Table[r[k][[n + 1 - k]], {n, 1, 12}, {k, 1, n}] Flatten[u] (* sequence *)
Formula
Transpose of the array in A354236.
Comments