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.

This page as a plain text file.
%I A344557 #11 Nov 29 2023 05:58:26
%S A344557 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,
%T A344557 35,6,1,3445,2863,1449,595,175,45,7,1,14897,12104,6692,2744,950,248,
%U A344557 56,8,1,63313,53769,29772,13236,4686,1422,336,68,9,1
%N 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.
%C A344557 The convolution triangle of A091147. - _Peter Luschny_, Oct 07 2022
%F A344557 The generalized Motzkin recurrence M(n, k, x, y) is defined as follows:
%F A344557 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).
%e A344557 [0]     1;
%e A344557 [1]     1,     1;
%e A344557 [2]     5,     2,     1;
%e A344557 [3]    13,    11,     3,     1;
%e A344557 [4]    57,    36,    18,     4,    1;
%e A344557 [5]   201,   165,    70,    26,    5,    1;
%e A344557 [6]   861,   646,   339,   116,   35,    6,   1;
%e A344557 [7]  3445,  2863,  1449,   595,  175,   45,   7,  1;
%e A344557 [8] 14897, 12104,  6692,  2744,  950,  248,  56,  8, 1;
%e A344557 [9] 63313, 53769, 29772, 13236, 4686, 1422, 336, 68, 9, 1.
%p A344557 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):
%p A344557 for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
%p A344557 # Uses function PMatrix from A357368. Adds a row and column above and to the right.
%p A344557 PMatrix(10, n -> simplify(hypergeom([1/2-n/2, 1-n/2], [2], 16))); # _Peter Luschny_, Oct 07 2022
%t A344557 (* Uses function PMatrix from A357368 *)
%t A344557 nmax = 9;
%t A344557 M = PMatrix[nmax+2, HypergeometricPFQ[{1/2 - #/2, 1 - #/2}, {2}, 16]&];
%t A344557 T[n_, k_] := M[[n+2, k+2]];
%t A344557 Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Nov 29 2023, after _Peter Luschny_ *)
%Y A344557 A091147 (first column), A344558 (row sums).
%K A344557 nonn,tabl
%O A344557 0,4
%A A344557 _Peter Luschny_, May 25 2021