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.

A129172 Triangle read by rows: T(n,k) is the number of skew Dyck paths of semilength n such that the area between the x-axis and the path is k (n >= 0, 0 <= k <= n^2).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 3, 2, 1, 1, 1, 0, 0, 0, 0, 1, 1, 4, 5, 5, 3, 5, 4, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 5, 7, 12, 10, 11, 12, 14, 12, 10, 8, 10, 7, 5, 4, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 6, 9, 19, 23, 28, 26, 36, 38, 38, 32, 36, 36, 34, 29, 27, 25, 21, 15, 16, 13, 10, 7, 5
Offset: 0

Views

Author

Emeric Deutsch, Apr 09 2007

Keywords

Comments

A skew Dyck path is a path in the first quadrant which begins at the origin, ends on the x-axis, consists of steps U=(1,1)(up), D=(1,-1)(down) and L=(-1,-1)(left) so that up and left steps do not overlap. The length of the path is defined to be the number of its steps.
Row n has n^2 + 1 terms, the first n of which are equal to 0.
Row sums yield A002212.
Sum of terms in column k is the Fibonacci number F(k) (k >= 1; F(1)=1, F(2)=1; A000045).

Examples

			T(4,7)=5 because we have UDUUUDLD, UDUUDUDL, UUDDUUDL, UUUDLDUD and UUUUDLLL.
Triangle starts:
  1;
  0, 1;
  0, 0, 1, 1, 1;
  0, 0, 0, 1, 1, 3, 2, 1, 1, 1;
  0, 0, 0, 0, 1, 1, 4, 5, 5, 3, 5, 4, 3, 2, 1, 1, 1;
		

Crossrefs

Programs

  • Maple
    G:=(1-z+z*g[1])/(1-t*x*z*g[1]): for i from 1 to 9 do g[i]:=(1-z+z*g[i+1])/(1-t^(2*i+1)*x*z*g[i+1]) od: g[10]:=0: x:=1: Gser:=simplify(series(G,z=0,9)): for n from 0 to 7 do P[n]:=sort(coeff(Gser,z,n)) od: for n from 0 to 7 do seq(coeff(P[n],t,j),j=0..n^2) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, y, t) option remember; expand(`if`(y>n, 0,
          `if`(n=0, 1, `if`(t<0, 0, b(n-1, y+1, 1)*z^(y+1/2))+
          `if`(y<1, 0, b(n-1, y-1, 0)*z^(y-1/2))+
          `if`(t>0 or y<1, 0, b(n-1, y-1, -1)*z^(1/2-y)))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..n^2))(b(2*n, 0$2)):
    seq(T(n), n=0..8);  # Alois P. Heinz, Jun 19 2016
  • Mathematica
    b[n_, y_, t_] := b[n, y, t] = Expand[If[y > n, 0, If[n == 0, 1, If[t < 0, 0, b[n - 1, y + 1, 1]*z^(y + 1/2)] + If[y < 1, 0, b[n - 1, y - 1, 0]*z^(y - 1/2)] + If[t > 0 || y < 1, 0, b[n - 1, y - 1, -1]*z^(1/2 - y)]]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 0, n^2}]][b[2*n, 0, 0]]; Table[T[n], {n, 0, 8}] // Flatten (* Jean-François Alcover, Dec 20 2016, after Alois P. Heinz *)

Formula

Sum_{k=0..n^2} k*T(n,k) = A129173(n).
G.f.: G(t,z) = H(t,1,z), where H(t,x,z) = 1+txzH(t,t^2*x,z)H(t,x,z) + z[H(t,t^2*x,z)-1] (H(t,x,z) is the trivariate g.f. for skew Dyck paths according to area, semiabscissa of the last point on the x-axis and semilength, marked by t,x and z, respectively).