cp's OEIS Frontend

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.

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.

This page as a plain text file.
%I A368752 #20 Jan 09 2024 16:56:55
%S A368752 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,
%T A368752 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,
%U A368752 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
%N 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.
%C A368752 See A368750 for the definition of balanced strings and atoms/co-atoms.
%D A368752 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 A368752 Paolo Xausa, <a href="/A368752/b368752.txt">Table of n, a(n) for n = 1..17576</a> (rows 1..8 of the triangle, flattened).
%F A368752 T(n,k) = A368750(n,k) + A368751(n,k).
%e A368752 Triangle begins:
%e A368752   [1] 1 1;
%e A368752   [2] 1 2 2 2 2 1;
%e A368752   [3] 1 1 2 2 2 3 3 3 3 2 2 3 3 3 3 2 2 2 1 1;
%e A368752   ...
%e A368752 The strings corresponding to row 2, in reverse lexicographical order, are:
%e A368752   "))((" (0 atoms, 1 co-atom),
%e A368752   ")()(" (2 co-atoms),
%e A368752   ")(()" (1 co-atom, 1 atom),
%e A368752   "())(" (1 atom, 1 co-atom),
%e A368752   "()()" (2 atoms) and
%e A368752   "(())" (1 atom).
%t A368752 strings[n_]:=Permutations[PadLeft[PadLeft[{},n,1],2n,-1]];
%t A368752 Array[Map[Count[Accumulate[#],0]&,strings[#]]&,5]
%Y A368752 Cf. A000984 (row lengths), A068551 (row sums), A362030 and A368804 (binary words).
%Y A368752 Cf. A368750 (atoms), A368751 (co-atoms), A368753 (defects).
%K A368752 nonn,tabf
%O A368752 1,4
%A A368752 _Paolo Xausa_, Jan 05 2024