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 A370698 #24 Mar 12 2024 22:29:46 %S A370698 1,3,2,7,4,5,15,6,9,10,31,8,11,18,21,63,12,13,20,37,42,127,14,17,22, %T A370698 41,74,85,255,16,19,26,43,82,149,170,511,24,23,34,45,84,165,298,341, %U A370698 1023,28,25,36,53,86,169,330,597,682,2047,30,27,38,69,90,171 %N A370698 Rectangular array, read by antidiagonals: row n consists of the numbers m whose binary representation has exactly n runs. %C A370698 Every positive integer occurs exactly once, and for every n, the numbers in row n have the parity of n. %e A370698 Corner: %e A370698 1 3 7 15 31 63 127 255 %e A370698 2 4 6 8 12 14 16 24 %e A370698 5 9 11 13 17 19 23 25 %e A370698 10 18 20 22 26 34 36 38 %e A370698 21 37 41 43 45 53 69 73 %e A370698 42 74 82 84 86 90 106 138 %e A370698 85 149 165 169 171 173 181 213 %e A370698 170 298 330 338 340 342 346 362 %e A370698 341 597 661 677 681 683 685 693 %e A370698 The binary representation of 22 is 10110, which has 4 runs: 1, 0, 11, 0. %t A370698 a[n_] := a[n] = Select[Range[8000], Length[Split[IntegerDigits[#, 2]]] == n &]; %t A370698 t[n_, k_] := a[n][[k]]; %t A370698 Grid[Table[t[n, k], {n, 1, 12}, {k, 1, 12}]] (* array *) %t A370698 Table[t[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten (* sequence *) %Y A370698 Cf. A007089, A005811 (# runs in binary n), A000225 (row 1), A043569 (row 2), A043570 (row 3), A000975 (column 1), A370893 (ternary). %K A370698 nonn,base,tabl %O A370698 1,2 %A A370698 _Clark Kimberling_, Mar 11 2024