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.

A344557 Triangle read by rows, T(n, k) = 2^(n - k)*M(n, k, 1/2, 1/2), where M(n, k, x, y) is a generalized Motzkin recurrence. T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 5, 2, 1, 13, 11, 3, 1, 57, 36, 18, 4, 1, 201, 165, 70, 26, 5, 1, 861, 646, 339, 116, 35, 6, 1, 3445, 2863, 1449, 595, 175, 45, 7, 1, 14897, 12104, 6692, 2744, 950, 248, 56, 8, 1, 63313, 53769, 29772, 13236, 4686, 1422, 336, 68, 9, 1
Offset: 0

Views

Author

Peter Luschny, May 25 2021

Keywords

Comments

The convolution triangle of A091147. - Peter Luschny, Oct 07 2022

Examples

			[0]     1;
[1]     1,     1;
[2]     5,     2,     1;
[3]    13,    11,     3,     1;
[4]    57,    36,    18,     4,    1;
[5]   201,   165,    70,    26,    5,    1;
[6]   861,   646,   339,   116,   35,    6,   1;
[7]  3445,  2863,  1449,   595,  175,   45,   7,  1;
[8] 14897, 12104,  6692,  2744,  950,  248,  56,  8, 1;
[9] 63313, 53769, 29772, 13236, 4686, 1422, 336, 68, 9, 1.
		

Crossrefs

A091147 (first column), A344558 (row sums).

Programs

  • Maple
    t := proc(n, k) option remember; if n = k then 1 elif k < 0 or n < 0 or k > n then 0 elif k = 0 then t(n-1, 0)/2 + t(n-1, 1) else t(n-1, k-1) + (1/2)*t(n-1, k) + t(n-1, k+1) fi end: T := (n, k) -> 2^(n-k) * t(n, k):
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
    # Uses function PMatrix from A357368. Adds a row and column above and to the right.
    PMatrix(10, n -> simplify(hypergeom([1/2-n/2, 1-n/2], [2], 16))); # Peter Luschny, Oct 07 2022
  • Mathematica
    (* Uses function PMatrix from A357368 *)
    nmax = 9;
    M = PMatrix[nmax+2, HypergeometricPFQ[{1/2 - #/2, 1 - #/2}, {2}, 16]&];
    T[n_, k_] := M[[n+2, k+2]];
    Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 29 2023, after Peter Luschny *)

Formula

The generalized Motzkin recurrence M(n, k, x, y) is defined as follows:
If k < 0 or n < 0 or k > n then 0 else if n = 0 then 1 else if k = 0 then x*M(n-1, 0, x, y) + M(n-1, 1, x, y). In all other cases M(n, k, x, y) = M(n-1, k-1, x, y) + y*M(n-1, k, x, y) + M(n-1, k+1, x, y).