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.

A132890 Triangle read by rows: T(n,k) is the number of left factors of Dyck paths of length n that have height k (1 <= k <= n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 4, 1, 1, 1, 7, 5, 5, 1, 1, 1, 7, 13, 6, 6, 1, 1, 1, 15, 18, 20, 7, 7, 1, 1, 1, 15, 39, 26, 27, 8, 8, 1, 1, 1, 31, 57, 73, 35, 35, 9, 9, 1, 1, 1, 31, 112, 99, 109, 44, 44, 10, 10, 1, 1, 1, 63, 169, 253, 152, 154, 54, 54, 11, 11, 1, 1
Offset: 1

Views

Author

Emeric Deutsch, Sep 08 2007

Keywords

Comments

Sum of terms in row n = binomial(n, floor(n/2)) = A001405(n).
T(n,2) = A052551(n-2) (n >= 2).
T(n,3) = A005672(n) = Fibonacci(n+1) - 2^floor(n/2).
Sum_{k=1..n} k*T(n,k) = A132891(n).

Examples

			T(5,3)=4 because we have UDUUU, UUDUU, UUUDD and UUUDU, where U=(1,1) and D=(1,-1).
Triangle starts:
  1;
  1, 1;
  1, 1, 1;
  1, 3, 1, 1;
  1, 3, 4, 1; 1;
  1, 7, 5, 5, 1, 1;
		

Crossrefs

Programs

  • Maple
    v := ((1-sqrt(1-4*z^2))*1/2)/z: g := proc (k) options operator, arrow: v^k*(1+v)*(1+v^2)/((1+v^(k+1))*(1+v^(k+2))) end proc: T := proc (n, k) options operator, arrow: coeff(series(g(k), z = 0, 50), z, n) end proc: for n from 0 to 12 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, k) option remember; `if`(x=0, z^k, `if`(y>0,
          b(x-2, y-1, k), 0)+ b(x-2, y+1, max(y+1, k)))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=1..n))(b(2*n, 0$2)):
    seq(T(n), n=1..16);  # Alois P. Heinz, Sep 05 2017
  • Mathematica
    b[x_, y_, k_] := b[x, y, k] = If[x == 0, z^k, If[y > 0, b[x - 2, y - 1, k], 0] + b[x - 2, y + 1, Max[y + 1, k]]];
    T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 1, n}]][b[2n, 0, 0]];
    Table[T[n], {n, 1, 16}] // Flatten (* Jean-François Alcover, Apr 01 2018, after Alois P. Heinz *)

Formula

The g.f. of column k is g(k, z) = v^k*(1+v)*(1+v^2)*/((1+v^(k+1))*(1+v^(k+2))), where v = (1-sqrt(1-4*z^2))/(2*z). (Obtained as the difference G(k,z)-G(k-1,z), where G(k,z) is given in the R. Kemp reference (p. 159).)

Extensions

Keyword tabl added by Michel Marcus, Apr 09 2013