|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
FORMULA
|
|
|
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
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|