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-3 of 3 results.

A300322 Number T(n,k) of Dyck paths of semilength n such that 2*k is the difference between the area under the right half of the path and the area under the left half of the path; triangle T(n,k), n>=0, -floor(n*(n-1)/6) <= k <= floor(n*(n-1)/6), read by rows.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 3, 6, 3, 1, 2, 5, 8, 12, 8, 5, 2, 1, 4, 9, 16, 22, 28, 22, 16, 9, 4, 1, 1, 4, 11, 21, 34, 49, 60, 69, 60, 49, 34, 21, 11, 4, 1, 2, 7, 15, 31, 53, 82, 114, 147, 171, 186, 171, 147, 114, 82, 53, 31, 15, 7, 2, 1, 5, 13, 30, 56, 95, 150, 216, 293, 371, 445, 495, 522, 495, 445, 371, 293, 216, 150, 95, 56, 30, 13, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 02 2018

Keywords

Examples

			               /\
T(3,-1) = 1:  /  \/\
.
                /\
               /  \     /\/\
T(3,0) = 3:   /    \   /    \   /\/\/\
.
                 /\
T(3,1) = 1:   /\/  \
.
Triangle T(n,k) begins:
:                             1                            ;
:                             1                            ;
:                             2                            ;
:                         1,  3,  1                        ;
:                     1,  3,  6,  3,  1                    ;
:                 2,  5,  8, 12,  8,  5,  2                ;
:         1,  4,  9, 16, 22, 28, 22, 16,  9,  4,  1        ;
:  1, 4, 11, 21, 34, 49, 60, 69, 60, 49, 34, 21, 11, 4, 1  ;
		

Crossrefs

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

Programs

  • Maple
    b:= proc(x, y, v) option remember; expand(
         `if`(min(y, v, x-max(y, v))<0, 0, `if`(x=0, 1, (l-> add(add(
          b(x-1, y+i, v+j)*z^((y-v)/2+(i-j)/4), i=l), j=l))([-1, 1]))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=ldegree(p)..degree(p)))(
                 add(b(n, (n-2*j)$2), j=0..n/2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[x_, y_, v_] := b[x, y, v] = Expand[If[Min[y, v, x - Max[y, v]] < 0, 0, If[x == 0, 1, Function[l, Sum[Sum[b[x - 1, y + i, v + j] z^((y - v)/2 + (i - j)/4), {i, l}], {j, l}]][{-1, 1}]]]];
    T[n_] := Function[p, Table[Coefficient[p, z, i], {i, Range[Exponent[p, z, Reverse @@ # &], Exponent[p, z]]}]][Sum[b[n, n-2j, n-2j], {j, 0, n/2}]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, May 31 2018, from Maple *)

Formula

T(n,k) = T(n,-k).
T(n,A130518(n)) = A177702(n).

A300952 Number of Dyck paths of semilength n having equal areas above the path and below the path, measured within the smallest enclosing rectangle based on the x-axis.

Original entry on oeis.org

1, 1, 2, 2, 7, 7, 35, 43, 238, 341, 1981, 3030, 18649, 29597, 190809, 311294, 2072334, 3462486, 23551368, 40166551, 277378932, 481159175, 3362641488, 5912848608, 41749776145, 74210799645, 528856595713, 948300730648, 6814672450367, 12308638880274, 89116042070616
Offset: 0

Views

Author

Alois P. Heinz, Mar 16 2018

Keywords

Examples

			                                                                  .__________.
                        a(5) = 7:                                 |    /\    |
           .______________________________________________________|   /  \   |
           |  /\/\    |  /\      |    /\    |      /\  |    /\/\  |  /    \  |
.__________| /    \   | /  \/\/\ | /\/  \/\ | /\/\/  \ |   /    \ | /      \ |
|/\/\/\/\/\|/______\/\|/________\|/________\|/________\|/\/______\|/________\| .
		

Crossrefs

Column k=0 of A300953.

A300996 Total sum of half the difference between the area above and the area below the path, measured within the smallest enclosing rectangle based on the x-axis, in all Dyck paths of semilength n.

Original entry on oeis.org

0, 0, 0, 1, 6, 28, 122, 516, 2142, 8776, 35630, 143757, 577548, 2313400, 9246556, 36899291, 147073062, 585662952, 2330527172, 9268803248, 36847836764, 146441131058, 581850689938, 2311451765318, 9181309423676, 36466002547328, 144826879361752, 575173217031049
Offset: 0

Views

Author

Alois P. Heinz, Mar 17 2018

Keywords

Examples

			a(3) = (1/2) * (0 -2 +2 +2 +0) = 1:
   .______.
   |  /\  |______.______.______.
   | /  \ | /\/\ | /\   |   /\ |______.
   |/____\|/____\|/__\/\|/\/__\|/\/\/\|
   |9 -9=0|5-7=-2|7 -5=2|7 -5=2|3 -3=0|
		

Crossrefs

Formula

a(n) = Sum_{k = -floor((n-1)^2/4)..floor((n-1)^2/4)} k * A300953(n,k).
Showing 1-3 of 3 results.