login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 5

%I #21 Jan 09 2024 16:56:47

%S 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 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 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 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 See A368750 for the definition of balanced strings and atoms/co-atoms.

%D 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 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 T(n,k) = A368752(n,k) - A368750(n,k).

%e Triangle begins:

%e [1] 1 0;

%e [2] 1 2 1 1 0 0;

%e [3] 1 1 2 1 2 3 2 2 1 1 1 2 1 1 0 0 1 0 0 0;

%e ...

%e The strings corresponding to row 2, in reverse lexicographical order, are:

%e "))((" (1 co-atom),

%e ")()(" (2 co-atoms),

%e ")(()" (1 co-atom),

%e "())(" (1 co-atom),

%e "()()" (0 co-atoms) and

%e "(())" (0 co-atoms).

%t strings[n_]:=Permutations[PadLeft[PadLeft[{},n,1],2n,-1]];

%t Array[Map[SequenceCount[Accumulate[#],{-1,0}]&,strings[#]]&,5]

%Y Cf. A000346 (row sums), A000984 (row lengths), A362030 and A368804 (binary words).

%Y Cf. A368750 (atoms), A368752 (all atoms), A368753 (defects).

%K nonn,tabf

%O 1,4

%A _Paolo Xausa_, Jan 05 2024

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 14 22:14 EDT 2024. Contains 375167 sequences. (Running on oeis4.)