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.

A045994 a(0)=1, a(n) = M(n) + Sum_{k=1..n-1} M(k)*a(n-k-1), where M(n) are the Motzkin numbers (A001006).

Original entry on oeis.org

1, 1, 3, 7, 18, 47, 125, 337, 918, 2522, 6977, 19415, 54297, 152507, 429974, 1216297, 3450817, 9816460, 27991422, 79989880, 229034820, 656979399, 1887653560, 5431969355, 15653355151, 45167783715, 130491471940, 377426429199
Offset: 0

Views

Author

Keywords

Comments

Apparently the number of grand Motzkin paths of length n that avoid DD starting at level 1. That is, avoiding either positive to negative or negative to positive crossings of the x axis. - David Scambler, Jul 04 2013

Crossrefs

Cf. A005773.

Programs

  • Mathematica
    m[0] = 1; m[n_] := m[n] = m[n-1] + Sum[m[k]*m[n-k-2], {k, 0, n-2}]; a[0] = 1; a[n_] := a[n] = m[n] + Sum[m[k]*a[n-k-1], {k, 1, n-1}]; Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Oct 04 2013 *)
  • Maxima
    a(n):=sum(sum(k/i*sum(binomial(i,j)*binomial(j,2*j-i-k),j,0,i)*binomial(n-i+k-1,k-1)*(-1)^(n-i),i,k,n),k,1,n); /* Vladimir Kruchinin, Sep 10 2010 */

Formula

G.f.: 1/(1-x(1+x)*M(x)), where M(x) is the generating function for the Motzkin numbers. a(n) = Sum(Sum(k/i*Sum(binomial(i,j)*binomial(j,2*j-i-k),j,0,i)*binomial(n-i+k-1,k-1)*(-1)^(n-i),i,k,n),k,1,n), n>0. - Vladimir Kruchinin, Sep 10 2010
Conjecture: (n+1)*a(n) + 2*(-2*n-1)*a(n-1) + 2*(-n+3)*a(n-2) + (11*n-19)*a(n-3) + (11*n-27)*a(n-4) + 3*(n-3)*a(n-5) = 0. - R. J. Mathar, Sep 27 2013