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 A368751 #21 Jan 09 2024 16:56:47 %S A368751 1,0,1,2,1,1,0,0,1,1,2,1,2,3,2,2,1,1,1,2,1,1,0,0,1,0,0,0,1,1,1,2,1,1, %T A368751 1,2,1,2,3,2,2,1,1,2,2,3,2,3,4,3,3,2,2,2,3,2,2,1,1,2,1,1,1,1,1,2,1,2, %U A368751 3,2,2,1,1,1,2,1,1,0,0,1,0,0,0,1,2,1,1,0,0,1,0,0,0,1,0,0,0,0 %N A368751 Irregular triangle read by rows: T(n,k) is the number of co-atoms contained in the k-th balanced string of left/right parentheses of length 2*n, where strings within a row are in reverse lexicographical order. %C A368751 See A368750 for the definition of balanced strings and atoms/co-atoms. %D A368751 Donald E. Knuth, The Art of Computer Programming, Vol. 4A: Combinatorial Algorithms, Part 1, Addison-Wesley, 2011, Section 7.2.1.6, exercise 60, p. 478. %H A368751 Paolo Xausa, <a href="/A368751/b368751.txt">Table of n, a(n) for n = 1..17576</a> (rows 1..8 of the triangle, flattened). %F A368751 T(n,k) = A368752(n,k) - A368750(n,k). %e A368751 Triangle begins: %e A368751 [1] 1 0; %e A368751 [2] 1 2 1 1 0 0; %e A368751 [3] 1 1 2 1 2 3 2 2 1 1 1 2 1 1 0 0 1 0 0 0; %e A368751 ... %e A368751 The strings corresponding to row 2, in reverse lexicographical order, are: %e A368751 "))((" (1 co-atom), %e A368751 ")()(" (2 co-atoms), %e A368751 ")(()" (1 co-atom), %e A368751 "())(" (1 co-atom), %e A368751 "()()" (0 co-atoms) and %e A368751 "(())" (0 co-atoms). %t A368751 strings[n_]:=Permutations[PadLeft[PadLeft[{},n,1],2n,-1]]; %t A368751 Array[Map[SequenceCount[Accumulate[#],{-1,0}]&,strings[#]]&,5] %Y A368751 Cf. A000346 (row sums), A000984 (row lengths), A362030 and A368804 (binary words). %Y A368751 Cf. A368750 (atoms), A368752 (all atoms), A368753 (defects). %K A368751 nonn,tabf %O A368751 1,4 %A A368751 _Paolo Xausa_, Jan 05 2024