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.

A114463 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k ascents of length 2 starting at an odd level (0<=k<=floor(n/2)-1 for n>=2; k=0 for n=0,1).

Original entry on oeis.org

1, 1, 2, 5, 13, 1, 36, 6, 105, 26, 1, 317, 104, 8, 982, 402, 45, 1, 3105, 1522, 225, 10, 9981, 5693, 1052, 69, 1, 32520, 21144, 4698, 412, 12, 107157, 78188, 20319, 2249, 98, 1, 356481, 288340, 85864, 11522, 679, 14, 1195662, 1061520, 356535, 56360, 4230
Offset: 0

Views

Author

Emeric Deutsch, Nov 29 2005

Keywords

Comments

Row n (n>=2) has floor(n/2) terms. Row sums are the Catalan numbers (A000108). Sum(kT(n,k),k=0..floor(n/2)-1)=binomial(2n-4,n) (A002694). Column 0 yields A114465.

Examples

			T(5,1) = 6 because we have UUD(UU)DUDDD, UUD(UU)DDUDD, UUD(UU)DDDUD,
UDUUD(UU)DDD, UUDUD(UU)DDD and UUUDD(UU)DDD, where U=(1,1), D=(1,-1) (the ascents of length 2 starting at an odd level are shown between parentheses; note that the fourth path has an ascent of length 2 that starts at an even level).
Triangle starts:
:  0 :    1;
:  1 :    1;
:  2 :    2;
:  3 :    5;
:  4 :   13,    1;
:  5 :   36,    6;
:  6 :  105,   26,    1;
:  7 :  317,  104,    8;
:  8 :  982,  402,   45,  1;
:  9 : 3105, 1522,  225, 10;
: 10 : 9981, 5693, 1052, 69, 1;
		

Crossrefs

Programs

  • Maple
    G:=-1/2*(1-z^2+z^2*t-sqrt((z^2*t-z^2+4*z-1)*(z^2*t-z^2-1)))/z/(-z^2+z^2*t+z-z*t-1): Gser:=simplify(series(G,z=0,18)): P[0]:=1: for n from 1 to 15 do P[n]:=coeff(Gser,z^n) od: 1; 1; for n from 2 to 15 do seq(coeff(t*P[n],t^j),j=1..floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
         `if`(x=0, 1, expand(b(x-1, y+1, [2, 2, 2, 5, 2][t])
          *`if`(t=5, z, 1) +b(x-1, y-1, [1, 3, 4, 1, 3][t]))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Jun 10 2014
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x==0, 1, Expand[b[x-1, y+1, {2, 2, 2, 5, 2}[[t]]]*If[t==5, z, 1] + b[x-1, y-1, {1, 3, 4, 1, 3}[[t]]]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 1]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Mar 31 2015, after Alois P. Heinz *)

Formula

G.f.: G=G(t, z) satisfies z[(1-t)z^2-(1-t)z+1]G^2-[1-(1-t)z^2]G+1=0.