login
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.
1
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,4
COMMENTS
The convolution triangle of A091147. - Peter Luschny, Oct 07 2022
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).
EXAMPLE
[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.
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 *)
CROSSREFS
A091147 (first column), A344558 (row sums).
Sequence in context: A118438 A336244 A083801 * A193590 A300051 A281890
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, May 25 2021
STATUS
approved