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.

A321396 Square array read by ascending antidiagonals, A(n, k) for n >= 0 and k >= 0, related to a class of Motzkin trees.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 0, 1, 0, 1, 1, 3, 2, 5, 0, 1, 0, 1, 1, 3, 2, 7, 0, 0, 1, 0, 1, 1, 3, 3, 9, 5, 14, 0, 1, 0, 1, 1, 3, 3, 9, 7, 20, 0, 0, 1, 0, 1, 1, 3, 3, 10, 9, 27, 19, 42
Offset: 0

Views

Author

Peter Luschny, Nov 11 2018

Keywords

Comments

The recursively specified combinatorial structure related to the array is the set of Motzkin trees where all leaves are at the same unary height (see section 3.2 in O. Bodini et al.).

Examples

			Array begins:
    [0]  0, 1, 0, 1, 0, 2, 0,  5,  0, 14,  0,  42,   0, 132, ...  A126120
    [1]  0, 1, 0, 1, 1, 2, 2,  7,  5, 20, 19,  60,  62, 202, ...  A300126
    [2]  0, 1, 0, 1, 1, 3, 2,  9,  7, 27, 25,  85,  86, 287, ...  A321572
    [3]  0, 1, 0, 1, 1, 3, 3,  9,  9, 29, 32,  93, 111, 317, ...
    [4]  0, 1, 0, 1, 1, 3, 3, 10,  9, 31, 34, 100, 119, 344, ...
    [5]  0, 1, 0, 1, 1, 3, 3, 10, 10, 31, 36, 102, 126, 352, ...
    [6]  0, 1, 0, 1, 1, 3, 3, 10, 10, 32, 36, 104, 128, 359, ...
    [7]  0, 1, 0, 1, 1, 3, 3, 10, 10, 32, 37, 104, 130, 361, ...
    [8]  0, 1, 0, 1, 1, 3, 3, 10, 10, 32, 37, 105, 130, 363, ...
    [9]  0, 1, 0, 1, 1, 3, 3, 10, 10, 32, 37, 105, 131, 363, ...
Array read by ascending diagonals:
    [0]  0
    [1]  0, 1
    [2]  0, 1, 0
    [3]  0, 1, 0, 1
    [4]  0, 1, 0, 1, 0
    [5]  0, 1, 0, 1, 1, 2
    [6]  0, 1, 0, 1, 1, 2, 0
    [7]  0, 1, 0, 1, 1, 3, 2, 5
    [8]  0, 1, 0, 1, 1, 3, 2, 7, 0
    [9]  0, 1, 0, 1, 1, 3, 3, 9, 5, 14
		

Crossrefs

Cf. A321395 (antidiagonal sums), A321397 (limit).
Cf. A000108 (Catalan), A001006 (Motzkin), A126120 (binary Catalan trees, row 0), A300126 (row 1), A321572 (row 2).

Programs

  • Maple
    Arow := proc(n, len) local rowgf, ser;
    rowgf := proc(n) option remember; `if`(n = 0, (1-sqrt(1-4*z^2))/(2*z),
    expand((1 - sqrt(1 - 4*z^2*rowgf(n-1)))/(2*z))) end:
    ser := series(rowgf(n)/z^n, z, 2*(2+max(len, n)));
    seq(coeff(ser, z, k), k=0..len) end:
    seq(Arow(n, 13), n=0..9);
  • Mathematica
    nmax = 11; gf[-1] = 1; gf[n_] := gf[n] = (1-Sqrt[1 - 4z^2 gf[n-1]])/(2z);
    row[n_] := row[n] = gf[n]/z^n + O[z]^(nmax+1) // CoefficientList[#, z]&;
    A[n_, k_] := row[n][[k + 1]];
    Table[A[n - k, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 08 2018 *)

Formula

Define a sequence of generating functions recursively gf(-1) = 1 and for n >= 0
gf(n) = (1 - sqrt(1 - 4*z^2*gf(n-1)))/(2*z).
Row n of the array has the generating function gf(n)/z^n. For fixed k column k differs only for finitely many indices from the limit value A321397(k).