login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A368752
Irregular triangle read by rows: T(n,k) is the number of atoms + 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.
5
1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 3, 3, 3, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1
OFFSET
1,4
COMMENTS
See A368750 for the definition of balanced strings and atoms/co-atoms.
REFERENCES
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.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..17576 (rows 1..8 of the triangle, flattened).
FORMULA
T(n,k) = A368750(n,k) + A368751(n,k).
EXAMPLE
Triangle begins:
[1] 1 1;
[2] 1 2 2 2 2 1;
[3] 1 1 2 2 2 3 3 3 3 2 2 3 3 3 3 2 2 2 1 1;
...
The strings corresponding to row 2, in reverse lexicographical order, are:
"))((" (0 atoms, 1 co-atom),
")()(" (2 co-atoms),
")(()" (1 co-atom, 1 atom),
"())(" (1 atom, 1 co-atom),
"()()" (2 atoms) and
"(())" (1 atom).
MATHEMATICA
strings[n_]:=Permutations[PadLeft[PadLeft[{}, n, 1], 2n, -1]];
Array[Map[Count[Accumulate[#], 0]&, strings[#]]&, 5]
CROSSREFS
Cf. A000984 (row lengths), A068551 (row sums), A362030 and A368804 (binary words).
Cf. A368750 (atoms), A368751 (co-atoms), A368753 (defects).
Sequence in context: A352629 A106825 A156608 * A323827 A275850 A112505
KEYWORD
nonn,tabf
AUTHOR
Paolo Xausa, Jan 05 2024
STATUS
approved