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.

A247333 Number of Dyck paths of semilength n avoiding the consecutive step pattern UDUDU, where U=(1,1) and D=(1,-1).

Original entry on oeis.org

1, 1, 2, 4, 11, 31, 92, 283, 893, 2875, 9407, 31189, 104555, 353794, 1206821, 4145350, 14326184, 49778473, 173794610, 609392578, 2145057797, 7577098816, 26850456704, 95425761829, 340047930692, 1214738997142, 4349231444405, 15604726428805, 56098211626478
Offset: 0

Views

Author

Alois P. Heinz, Sep 13 2014

Keywords

Crossrefs

Cf. A001006.
Column k=0 of A246188.
Column k=21 of A243753.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<5, [1$2, 2, 4, 11][n+1],
          ((n-2)*a(n-1) +(7*n-11)*a(n-2) +(11*n-31)*a(n-3)
          +(9*n-36)*a(n-4) +(3*n-15)*a(n-5)) / (n+1))
        end:
    seq(a(n), n=0..40);
  • Mathematica
    CoefficientList[Series[(1 + x + x^2 - Sqrt[-3 x^4 - 6 x^3 - 5 x^2 - 2 x + 1])/(2 x^2 + 2 x), {x, 0, 28}], x] (* or *)
    {1}~Join~Table[Sum[(Binomial[k, n - k] Sum[Binomial[j, -k + 2 j - 1] Binomial[k, j], {j, 0, k}])/k, {k, 1, n}], {n, 1, 28}] (* Michael De Vlieger, Mar 03 2016, the latter after Maxima by Vladimir Kruchinin *)
  • Maxima
    a(n):=if n=0 then 1 else sum((binomial(k,n-k)*sum(binomial(j,-k+2*j-1)*binomial(k,j),j,0,k))/k,k,1,n); /* Vladimir Kruchinin, Mar 03 2016 */

Formula

Recursion: see Maple program.
a(n) ~ sqrt(42-6*sqrt(21)) * ((3+sqrt(21))/2)^n / (4 * sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Sep 16 2014
From Vladimir Kruchinin, Mar 03 2016: (Start)
G.f.: (1+x+x^2-sqrt(-3*x^4-6*x^3-5*x^2-2*x+1))/(2*x^2+2*x).
G.f.: B(x)+1, where B(x) satisfies B(x)=(x+x^2)*(1+B(x)+B(x)^2).
a(n) = Sum_{k=1..n} binomial(k,n-k)*M(k+1), a(0)=1, where M(k) are Motzkin numbers (A001006). (End)