login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A379838
Triangle read by rows: T(n,k) is the total number of humps with height k in all Motzkin paths of order n, n >= 2 and 1 <= k <= n/2,
2
1, 3, 8, 1, 20, 5, 50, 19, 1, 126, 63, 7, 322, 196, 34, 1, 834, 588, 138, 9, 2187, 1728, 507, 53, 1, 5797, 5016, 1749, 253, 11, 15510, 14454, 5786, 1067, 76, 1, 41834, 41470, 18590, 4147, 416, 13, 113633, 118690, 58487, 15223, 1976, 103, 1, 310571, 339274, 181181, 53599, 8528, 635, 15
OFFSET
2,2
LINKS
Xiaomei Chen, Counting humps and peaks in Motzkin paths with height k, arXiv:2412.00668 [math.CO], Dec 2024.
FORMULA
G.f.: Sum_{n>=2, k>=1} T(n,k) * x^n * y^k = x^2 * M^2(x) * y / ((1-x) * (1 - x^2 * M^2(x) * y)), where M(x) is the g.f. for A001006.
T(n,k) = Sum_{i=0..n-2*k, i==n (mod 2)} (4*k) / (n-i+2*k) * binomial(n,i) * binomial(n-i-1,(n-i)/2+k-1).
T(n,k) = Sum_{i=2k-1..n-1} A064189(i,2k-1).
T(n,k) + T(n,k+1) = A064189(n,2k).
EXAMPLE
Triangle begins:
[2] 1;
[3] 3;
[4] 8, 1;
[5] 20, 5;
[6] 50, 19, 1;
[7] 126, 63, 7;
[8] 322, 196, 34, 1;
[9] 834, 588, 138, 9;
[10] 2187, 1728, 507, 53, 1;
...
PROG
(Sage)
def A379838_triangel(dim):
M = matrix(ZZ, dim, dim)
for n in (2..dim+1):
for k in (1..math.floor(n/2)+1):
for i in range(n-2*k+1):
if ((n-i)%2)==0:
M[n-2, k-1]=M[n-2, k-1]+(4*k)/(n-i+2*k)*binomial(n, i)*binomial(n-i-1, (n-i)/2+k-1)
return M
CROSSREFS
Row lengths give A004526.
Row sums give A097861.
Column 1 gives A140662.
Cf. A064189.
Sequence in context: A197725 A288875 A152230 * A181371 A118357 A278866
KEYWORD
nonn,tabf
AUTHOR
Xiaomei Chen, Jan 04 2025
STATUS
approved