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.
%I A359364 #37 Jan 10 2023 13:05:07 %S A359364 1,1,0,1,0,1,1,0,3,0,1,0,6,0,2,1,0,10,0,10,0,1,0,15,0,30,0,5,1,0,21,0, %T A359364 70,0,35,0,1,0,28,0,140,0,140,0,14,1,0,36,0,252,0,420,0,126,0,1,0,45, %U A359364 0,420,0,1050,0,630,0,42,1,0,55,0,660,0,2310,0,2310,0,462,0 %N A359364 Triangle read by rows. The Motzkin triangle, the coefficients of the Motzkin polynomials. M(n, k) = binomial(n, k) * CatalanNumber(k/2) if k is even, otherwise 0. %C A359364 The generalized Motzkin numbers M(n, k) are a refinement of the Motzkin numbers M(n) (A001006) in the sense that they are coefficients of polynomials M(n, x) = Sum_{n..k} M(n, k) * x^k that take the value M(n) at x = 1. The coefficients of x^n are the aerated Catalan numbers A126120. %C A359364 Variants are the irregular triangle A055151 with zeros deleted, A097610 with reversed rows, A107131 and A080159. %C A359364 In the literature the name 'Motzkin triangle' is also used for the triangle A026300, which is generated from the powers of the generating function of the Motzkin numbers. %H A359364 M. Artioli, G. Dattoli, S. Licciardi, and S. Pagnutti, <a href="https://arxiv.org/abs/1703.07262">Motzkin Numbers: an Operational Point of View</a>, arXiv:1703.07262 [math.CO], 2017, (Table 1 on p. 3). %F A359364 Let p(n, x) = hypergeom([(1 - n)/2, -n/2], [2], (2*x)^2). %F A359364 p(n, 1) = A001006(n); p(n, sqrt(2)) = A025235(n); p(n, 2) = A091147(n). %F A359364 p(2, n) = A002522(n); p(3, n) = A056107(n). %F A359364 p(n, n) = A359649(n); 2^n*p(n, 1/2) = A000108(n+1). %F A359364 M(n, k) = [x^k] p(n, x). %F A359364 M(n, k) = [t^k] (n! * [x^n] exp(x) * BesselI(1, 2*t*x) / (t*x)). %F A359364 M(n, k) = [t^k][x^n] ((1 - x - sqrt((x-1)^2 - (2*t*x)^2)) / (2*(t*x)^2)). %F A359364 M(n, n) = A126120(n). %F A359364 M(n, n-1) = A138364(n), the number of Motzkin n-paths with exactly one flat step. %F A359364 M(2*n, 2*n) = A000108(n), the number of peakless Motzkin paths having a total of n up and level steps. %F A359364 M(4*n, 2*n) = A359647(n), the central terms without zeros. %F A359364 M(2*n+2, 2*n) = A002457(n) = (-4)^n * binomial(-3/2, n). %F A359364 Sum_{k=0..n} M(n - k, k) = A023426(n). %F A359364 Sum_{k=0..n} k * M(n, k) = 2*A014531(n-1) = 2*GegenbauerC(n - 2, -n, -1/2). %F A359364 Sum_{k=0..n} i^k*M(n, k) = A343773(n), (i the imaginary unit), is the excess of the number of even Motzkin n-paths (A107587) over the odd ones (A343386). %F A359364 Sum_{k=0..n} Sum_{j=0..k} M(n, j) = A189912(n). %F A359364 Sum_{k=0..n} Sum_{j=0..k} M(n, n-j) = modified A025179(n). %F A359364 For a recursion see the Python program. %e A359364 Triangle M(n, k) starts: %e A359364 [0] 1; %e A359364 [1] 1, 0; %e A359364 [2] 1, 0, 1; %e A359364 [3] 1, 0, 3, 0; %e A359364 [4] 1, 0, 6, 0, 2; %e A359364 [5] 1, 0, 10, 0, 10, 0; %e A359364 [6] 1, 0, 15, 0, 30, 0, 5; %e A359364 [7] 1, 0, 21, 0, 70, 0, 35, 0; %e A359364 [8] 1, 0, 28, 0, 140, 0, 140, 0, 14; %e A359364 [9] 1, 0, 36, 0, 252, 0, 420, 0, 126, 0; %p A359364 CatalanNumber := n -> binomial(2*n, n)/(n + 1): %p A359364 M := (n, k) -> ifelse(irem(k, 2) = 1, 0, CatalanNumber(k/2)*binomial(n, k)): %p A359364 for n from 0 to 9 do seq(M(n, k), k = 0..n) od; %p A359364 # Alternative, as coefficients of polynomials: %p A359364 p := n -> hypergeom([(1 - n)/2, -n/2], [2], (2*x)^2): %p A359364 seq(print(seq(coeff(simplify(p(n)), x, k), k = 0..n)), n = 0..9); %p A359364 # Using the exponential generating function: %p A359364 egf := exp(x)*BesselI(1, 2*x*t)/(x*t): ser:= series(egf, x, 11): %p A359364 seq(print(seq(coeff(simplify(n!*coeff(ser, x, n)), t, k), k = 0..n)), n = 0..9); %o A359364 (Python) %o A359364 from functools import cache %o A359364 @cache %o A359364 def M(n: int, k: int) -> int: %o A359364 if k % 2: return 0 %o A359364 if n < 3: return 1 %o A359364 if n == k: return (2 * (n - 1) * M(n - 2, n - 2)) // (n // 2 + 1) %o A359364 return (M(n - 1, k) * n) // (n - k) %o A359364 for n in range(10): print([M(n, k) for k in range(n + 1)]) %Y A359364 Variants: A055151, A080159, A097610, A107131. %Y A359364 Columns M(n, 2*k): A000012, A000217, A034827, A000910, A088625, A088626, A213380. %Y A359364 Cf. A001006 (Motzkin numbers), A026300 (Motzkin gf. triangle), A126120 (aerated Catalan), A000108 (Catalan). %Y A359364 Cf. A138364, A107587, A002457, A002522, A025179, A025235, A056107, A014531, A023426, A091147, A189912, A343386, A343773, A359647, A359649. %K A359364 nonn,tabl %O A359364 0,9 %A A359364 _Peter Luschny_, Jan 09 2023