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 A370924 #8 Mar 15 2024 05:10:11 %S A370924 1,4,3,13,5,10,40,9,11,30,121,12,15,32,91,364,14,16,33,92,273,1093,17, %T A370924 28,34,96,275,820,3280,27,29,46,97,276,821,2460,9841,36,31,47,100,277, %U A370924 825,2462,7381,29524,39,35,48,101,289,826,2463,7382,22143 %N A370924 Rectangular array, read by antidiagonals: row n consists of the numbers m whose ternary representation starts with 1 and has exactly n runs. %C A370924 Every positive integer occurs in this array or A370925. %e A370924 Corner: %e A370924 1 4 13 40 121 364 1093 3280 %e A370924 3 5 9 12 14 17 27 36 %e A370924 10 11 15 16 28 29 31 35 %e A370924 30 32 33 34 46 47 48 50 %e A370924 91 92 96 97 100 101 102 104 %e A370924 273 275 276 277 289 290 291 293 %e A370924 820 821 825 826 829 830 831 833 %t A370924 d[n_] := First[IntegerDigits[n, 3]]; %t A370924 a[n_] := a[n] = Select[Range[30000], %t A370924 d[#] == 1 && Length[Split[IntegerDigits[#, 3]]] == n &]; %t A370924 t[n_, k_] := a[n][[k]]; %t A370924 Grid[Table[t[n, k], {n, 1, 10}, {k, 1, 10}]] (* array *) %t A370924 Table[t[n - k + 1, k], {n, 10}, {k, n, 1, -1}] // Flatten (* sequence *) %Y A370924 Cf. A007089, A043555, A132141, A370893, A370925. %K A370924 nonn,base,tabl %O A370924 1,2 %A A370924 _Clark Kimberling_, Mar 13 2024