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.

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.

Original entry on oeis.org

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

Views

Author

Xiaomei Chen, Jan 04 2025

Keywords

Examples

			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;
  ...
		

Crossrefs

Row lengths give A004526.
Row sums give A097861.
Column 1 gives A140662.
Cf. A064189.

Programs

  • 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

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).