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 A370885 #24 Mar 13 2024 04:42:39 %S A370885 0,1,1,2,2,0,2,3,3,1,3,1,1,1,3,4,4,2,4,2,2,2,4,2,2,0,2,0,2,2,4,5,5,3, %T A370885 5,3,3,3,5,3,3,1,3,1,3,3,5,3,3,1,3,1,1,1,3,1,1,1,3,1,3,3,5,6,6,4,6,4, %U A370885 4,4,6,4,4,2,4,2,4,4,6,4,4,2,4,2,2,2,4,2 %N A370885 Irregular triangle read by rows: T(n,k) is the total number of unmatched parentheses (both left and right) in the k-th string of parentheses of length n, where strings within a row are in reverse lexicographical order. %C A370885 See A370883 for more information. %D A370885 Donald E. Knuth, The Art of Computer Programming, Vol. 4A: Combinatorial Algorithms, Part 1, Addison-Wesley, 2011, Section 7.2.1.6, p. 459. %H A370885 Paolo Xausa, <a href="/A370885/b370885.txt">Table of n, a(n) for n = 0..16382</a> (rows 0..13 of the triangle, flattened). %F A370885 T(n,k) = A370883(n,k) + A370884(n,k). %e A370885 Triangle begins: %e A370885 [0] 0; %e A370885 [1] 1 1; %e A370885 [2] 2 2 0 2; %e A370885 [3] 3 3 1 3 1 1 1 3; %e A370885 [4] 4 4 2 4 2 2 2 4 2 2 0 2 0 2 2 4; %e A370885 ... %t A370885 countLR[s_] := StringLength[s] - StringLength[StringJoin[StringCases[s, RegularExpression["1(?R)*+0"]]]]; %t A370885 Array[Map[countLR, IntegerString[Range[0, 2^#-1], 2, #]] &, 7, 0] %Y A370885 Cf. A370883, A370884. %Y A370885 Cf. A000079 (row lengths). %Y A370885 Apparently, row sums are given by 2*A189391. %K A370885 nonn,tabf %O A370885 0,4 %A A370885 _Paolo Xausa_, Mar 06 2024