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.

A091156 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n, having k long ascents (i.e., ascents of length at least 2). Rows are of length 1,1,2,2,3,3,... .

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 1, 11, 2, 1, 26, 15, 1, 57, 69, 5, 1, 120, 252, 56, 1, 247, 804, 364, 14, 1, 502, 2349, 1800, 210, 1, 1013, 6455, 7515, 1770, 42, 1, 2036, 16962, 27940, 11055, 792, 1, 4083, 43086, 95458, 57035, 8217, 132, 1, 8178, 106587, 305812, 257257
Offset: 0

Views

Author

Emeric Deutsch, Feb 22 2004

Keywords

Comments

Also number of ordered trees with n edges, having k branch nodes (i.e., vertices of outdegree at least 2).
Also number of Łukasiewicz paths of length n having k fall steps (1,-1) that start at an odd level. A Łukasiewicz path of length n is a path in the first quadrant from (0,0) to (n,0) using rise steps (1,k) for any positive integer k, level steps (1,0) and fall steps (1,-1) (see R. P. Stanley, Enumerative Combinatorics, Vol. 2, Cambridge Univ. Press, Cambridge, 1999, p. 223, Exercise 6.19w; the integers are the slopes of the steps). Example: T(4,2)=2 because we have U(D)U(D) and U(3)(D)D(D), where U=(1,1), D=(1,-1), U(3)=(1,3) and the fall steps that start at an odd level are shown between parentheses. Row n has 1+floor(n/2) terms. Row sums are the Catalan numbers (A000108). T(2n,n)=A000108(n). T(2n+1,n)=A001791(n+1)=binomial(2n+2,n). - Emeric Deutsch, Jan 06 2005
Also number of Dyck paths of semilength n with k UUD's - I. Tasoulas (jtas(AT)unipi.gr), Feb 19 2006
T(n,k) = number of Dyck n-paths whose decomposition into 2-step subpaths contains k UUs. For example, T(4,2)=2 counts UU|UU|DD|DD, UU|DD|UU|DD (vertical bars indicate path decomposition). - David Callan, Jun 07 2006
T(n,k) = number of binary trees on n-1 edges containing k right edges whose child vertex has no right child. Under Knuth's "natural" correspondence, such a vertex in binary (n-1)-tree ~ a vertex of outdegree >=2 in ordered n-tree. - David Callan, Sep 25 2006
T(n,k) = number of binary trees on n-1 edges containing k left edges whose child vertex has no left child. Under "natural" correspondence, such a vertex in binary (n-1)-tree ~ a leaf edge with no left neighbor edge and not incident to the root in ordered n-tree ~ a UUD in Dyck n-path. - David Callan, Sep 25 2006
T(n,k) = number of permutations of length n avoiding 321 (classically) with k descents. - Andrew Baxter, May 17 2011.

Examples

			T(4,1) = 11 because among the 14 Dyck paths of semilength 4, the paths that do not have exactly one long ascent are UDUDUDUD (no long ascent), UUDDUUDD (two long ascents) and UUDUUDDD (two long ascents). Here U=(1,1) and D=(1,-1).
Triangle begins:
  1;
  1;
  1,    1;
  1,    4;
  1,   11,    2;
  1,   26,   15;
  1,   57,   69,    5;
  1,  120,  252,   56;
  1,  247,  804,  364,   14;
  1,  502, 2349, 1800,  210;
  1, 1013, 6455, 7515, 1770, 42;
  ...
		

References

  • R. P. Stanley, Enumerative Combinatorics, Vol. 1, 1986; See Exercise 3.71(f).

Crossrefs

T(n,k) are rational multiples of A055151.

Programs

  • Maple
    a := (n,k)->binomial(n+1,k)* add(binomial(k+j-1,k-1)*binomial(n+1-k, n-2*k-j), j=0..n-2*k)/(n+1); seq(seq(a(n,k), k=0..floor(n/2)),n=0..15);
    seq(seq(simplify(n!*(1+k)/((n-2*k)!*(1+k)!^2)*hypergeom([k,2*k-n],[k+2],-1)),k=0.. floor(n/2)),n=0..15); # Peter Luschny, Oct 16 2015
    # alternative Maple program:
    b:= proc(x, y) option remember; `if`(y>x or y<0, 0,
          `if`(x=0, 1, expand(b(x-1, y)*`if`(y=0, 1, 2)*z+
           b(x-1, y+1) +b(x-1, y-1))))
        end:
    T:= n-> (p-> seq(coeff(p, z, n-2*i), i=0..n/2))(b(n, 0)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Aug 07 2018
  • Mathematica
    T[n_, k_] := Binomial[n+1, k]*Sum[Binomial[k+j-1, k-1]*Binomial[n+1-k, n- 2*k-j], {j, 0, n-2*k}]/(n+1); Table[T[n, k], {n, 0, 15}, {k, 0, Floor[n/2 ]}] // Flatten (* Jean-François Alcover, Jan 31 2016 *)
  • PARI
    tabf(nn) = {for(n=-1, nn, for(k=0, floor(n/2), if(binomial(n+1,k) * sum(j=0, n-2*k, binomial(k+j-1,k-1) * binomial(n+1-k,n-2*k-j))/(n+1)==0,print1("1, "), print1(binomial(n+1,k) * sum(j=0, n-2*k, binomial(k+j-1,k-1) * binomial(n+1-k,n-2*k-j))/(n+1),", "));); print();); };
    tabf(16); \\ Indranil Ghosh, Mar 05 2017

Formula

T(n,k) = (1/(n+1)) * binomial(n+1, k) * Sum_{j=0..n-2k} binomial(k+j-1, k-1)*binomial(n+1-k, n-2k-j).
G.f. G(t, z) satisfies z*(1-z+t*z)*G^2 - G + 1 = 0.
T(n,k) = n!*(1+k)/((n-2*k)!*(1+k)!^2)*hypergeom([k,2*k-n], [k+2], -1). - Peter Luschny, Oct 16 2015
T(n,k) = A055151(n,k)*hypergeom([k,2*k-n],[k+2],-1). - Peter Luschny, Oct 16 2015

Extensions

Edited by Andrew Baxter, May 17 2011