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 A214614 #29 Sep 01 2014 07:45:09 %S A214614 1,1,2,1,2,3,1,2,4,1,2,4,5,1,2,3,4,5,6,1,2,4,5,7,1,2,4,8,1,2,4,5,7,8, %T A214614 9,1,2,4,5,8,10,1,2,4,5,8,10,11,1,2,3,4,5,6,8,10,12,1,2,4,5,8,10,13,1, %U A214614 2,4,5,7,8,10,11,13,14,1,2,4,5,8,10,15 %N A214614 Irregular triangle read by rows: row n gives numbers <= n whose Collatz trajectory contains the trajectory of n. %C A214614 Each row has A159999(n) elements and ends in n. %H A214614 T. D. Noe, <a href="/A214614/b214614.txt">Rows n = 1..200 of irregular triangle, flattened</a> %H A214614 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %e A214614 Rows of triangle: %e A214614 {1}, %e A214614 {1, 2}, %e A214614 {1, 2, 3}, %e A214614 {1, 2, 4}, %e A214614 {1, 2, 4, 5}, %e A214614 {1, 2, 3, 4, 5, 6}, %e A214614 {1, 2, 4, 5, 7}, %e A214614 {1, 2, 4, 8}, %e A214614 {1, 2, 4, 5, 7, 8, 9}, %e A214614 {1, 2, 4, 5, 8, 10} %t A214614 Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; f[n_] := Module[{c = Collatz[n]}, Select[c, # <= n &]]; t = Table[f[n], {n, 20}]; Flatten[t] (* _T. D. Noe_, Mar 07 2013 *) %o A214614 (Haskell) %o A214614 import Data.List (sort) %o A214614 a214614 n k = a214614_tabf !! (n-1) (k-1) %o A214614 a214614_row n = a214614_tabf !! (n-1) %o A214614 a214614_tabf = zipWith f [1..] a070165_tabf where %o A214614 f v ws = sort $ filter (<= v) ws %o A214614 -- _Reinhard Zumkeller_, Sep 01 2014 %Y A214614 Cf. A070165, A159999. %K A214614 nonn,tabf %O A214614 1,3 %A A214614 _Jayanta Basu_, Mar 06 2013