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.

Showing 1-2 of 2 results.

A300953 Number T(n,k) of Dyck paths of semilength n such that 2*k is the difference between the area above the path and the area below the path, measured within the smallest enclosing rectangle based on the x-axis; triangle T(n,k), n>=0, -floor((n-1)^2/4) <= k <= floor((n-1)^2/4), read by rows.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 0, 7, 0, 5, 1, 2, 3, 6, 7, 8, 6, 6, 3, 2, 0, 9, 0, 20, 0, 35, 0, 34, 0, 25, 0, 7, 1, 2, 4, 8, 10, 17, 23, 30, 38, 43, 46, 48, 42, 41, 26, 26, 12, 8, 4, 2, 0, 11, 0, 29, 0, 63, 0, 115, 0, 176, 0, 238, 0, 255, 0, 230, 0, 169, 0, 92, 0, 41, 0, 9
Offset: 0

Views

Author

Alois P. Heinz, Mar 16 2018

Keywords

Examples

			              .______.
              | /\/\ |  ,  rectangle area: 12, above path area: 5,
T(3,-1) = 1:  |/____\|  ,  below path area: 7, difference: (5-7) = 2 * (-1).
.
                 /\
                /  \
T(3,0) = 2:    /    \   /\/\/\  .
.
                /\         /\
T(3,1) = 2:    /  \/\   /\/  \  .
.
Triangle T(n,k) begins:
:                                   1                                    ;
:                                   1                                    ;
:                                   2                                    ;
:                               1,  2,  2                                ;
:                           2,  0,  7,  0,  5                            ;
:                   1,  2,  3,  6,  7,  8,  6,  6,  3                    ;
:           2,  0,  9,  0, 20,  0, 35,  0, 34,  0, 25,  0,  7            ;
:  1, 2, 4, 8, 10, 17, 23, 30, 38, 43, 46, 48, 42, 41, 26, 26, 12, 8, 4  ;
		

Crossrefs

Row sums give A000108.
Column k=0 gives A300952.

Formula

Sum_{k = -floor((n-1)^2/4)..floor((n-1)^2/4)} k * T(n,k) = A300996(n).
T(n,-floor((n-1)^2/4)) = A040001(n).
T(n, floor((n-1)^2/4)) = A026741(n+1) for n > 2.
T(n,k) = 0 iff n is even and k is odd or abs(k) > floor(n*(n-1)/6).

A300323 Number of Dyck paths of semilength n such that the area under the right half of the path equals the area under the left half of the path.

Original entry on oeis.org

1, 1, 2, 3, 6, 12, 28, 69, 186, 522, 1536, 4638, 14408, 45568, 146884, 479871, 1589516, 5320854, 18000198, 61412376, 211282386, 731973720, 2553168136, 8957554412, 31604599044, 112060048354, 399227283950, 1428315878002, 5130964125124, 18499652813682
Offset: 0

Views

Author

Alois P. Heinz, Mar 02 2018

Keywords

Examples

			              /\
             /  \      /\/\
a(3) = 3:   /    \    /    \    /\/\/\ .
.
a(5) = 12 counts A001405(5) = 10 symmetric plus 2 non-symmetric Dyck paths:
             /\  /\
          /\/  \/  \  and its reversal.
		

Crossrefs

Column k=0 of A300322.
Cf. A000108 (all Dyck paths), A000225, A001405 (symmetric Dyck paths), A129182, A239927, A298645.

Programs

  • Maple
    b:= proc(x, y) option remember; expand(`if`(x=0, 1,
          `if`(y<1,   0, b(x-1, y-1)*z^(2*y-1))+
          `if`(x add(coeff(p, z, i)^2
          , i=0..degree(p)))(b(n, n-2*j)), j=0..n/2)
        end:
    seq(a(n), n=0..32);
  • Mathematica
    b[x_, y_] := b[x, y] = Expand[If[x == 0, 1, If[y < 1, 0, b[x - 1, y - 1] z^(2y - 1)] + If[x < y + 2, 0, b[x - 1, y + 1] z^(2y + 1)]]];
    a[n_] := a[n] = Sum[Function[p, Sum[Coefficient[p, z, i]^2, {i, 0, Exponent[p, z]}]][b[n, n - 2j]], {j, 0, n/2}];
    Table[a[n], {n, 0, 32}] (* Jean-François Alcover, May 31 2018, from Maple *)

Formula

a(n) >= A001405(n) with equality only for n <= 4.
a(n) is odd <=> n in { A000225 }.
Showing 1-2 of 2 results.