This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A220237 #16 Oct 16 2021 19:23:28 %S A220237 1,1,2,1,2,3,4,5,8,10,16,1,2,4,1,2,4,5,8,16,1,2,3,4,5,6,8,10,16,1,2,4, %T A220237 5,7,8,10,11,13,16,17,20,22,26,34,40,52,1,2,4,8,1,2,4,5,7,8,9,10,11, %U A220237 13,14,16,17,20,22,26,28,34,40,52,1,2,4,5,8,10,16 %N A220237 Triangle read by rows: sorted terms of Collatz trajectories. %C A220237 n-th row = sorted list of {A070165(n,k): k = 1..A006577(n)}; %C A220237 T(n,1) = 1 if Collatz conjecture is true. %H A220237 Reinhard Zumkeller, <a href="/A220237/b220237.txt">Rows n = 1..120 of triangle, flattened</a> %H A220237 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %e A220237 The table begins: %e A220237 . 1: [1] %e A220237 . 2: [1,2] %e A220237 . 3: [1,2,3,4,5,8,10,16] %e A220237 . 4: [1,2,4] %e A220237 . 5: [1,2,4,5,8,16] %e A220237 . 6: [1,2,3,4,5,6,8,10,16] %e A220237 . 7: [1,2,4,5,7,8,10,11,13,16,17,20,22,26,34,40,52] %e A220237 . 8: [1,2,4,8] %e A220237 . 9: [1,2,4,5,7,8,9,10,11,13,14,16,17,20,22,26,28,34,40,52] %e A220237 . 10: [1,2,4,5,8,10,16] %e A220237 . 11: [1,2,4,5,8,10,11,13,16,17,20,26,34,40,52] %e A220237 . 12: [1,2,3,4,5,6,8,10,12,16] . %p A220237 T:= proc(n) option remember; `if`(n=1, 1, %p A220237 sort([n, T(`if`(n::even, n/2, 3*n+1))])[]) %p A220237 end: %p A220237 seq(T(n), n=1..10); # _Alois P. Heinz_, Oct 16 2021 %t A220237 Flatten[Table[Sort[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]],{n,12}]] (* _Harvey P. Dale_, Jan 28 2013 *) %o A220237 (Haskell) %o A220237 import Data.List (sort) %o A220237 a220237 n k = a220237_tabf !! (n-1) !! (k-1) %o A220237 a220237_row n = a220237_tabf !! (n-1) %o A220237 a220237_tabf = map sort a070165_tabf %Y A220237 Cf. A006577 (row lengths), A025586(right edge), A033493 (row sums). %K A220237 nonn,tabf,look %O A220237 1,3 %A A220237 _Reinhard Zumkeller_, Jan 03 2013