OFFSET
0,5
LINKS
Jean-Luc Baril, Pamela E. Harris, Kimberly J. Harry, Matt McClinton, and José L. Ramírez, Enumerating runs, valleys, and peaks in Catalan words, arXiv:2404.05672 [math.CO], 2024. See Corollary 4.7, p. 19.
FORMULA
G.f.: (1 - 3*x - (1 - x)*sqrt(1 - 4*x))/(2*(1 - x)*sqrt(1 - 4*x)).
a(n) = Sum_{i=1..n-1} binomial(2*(n-i)-1,n-i-2).
a(n) ~ 2^(2*n)/(6*sqrt(Pi*n)).
a(n)/A371963(n) ~ 1.
a(n) - a(n-1) = A002054(n-2).
From Mélika Tebni, Jun 15 2024: (Start)
E.g.f.: (exp(2*x)*BesselI(0,2*x)-1)/2 - exp(x)*Integral_{x=-oo..oo} BesselI(0,2*x)*exp(x) dx.
a(n) = binomial(2*n,n)*(1/2 + hypergeom([1,n+1/2],[n+1],4)) + i/sqrt(3) - 0^n/2.
EXAMPLE
a(3) = 1 because there is 1 Catalan word of length 3 with one peak: 010.
a(4) = 6 because there are 6 Catalan words of length 4 with one peak: 0010, 0100, 0101, 0110, 0120, and 0121 (see Figure 10 at p. 19 in Baril et al.).
MAPLE
a:= proc(n) option remember; `if`(n<3, 0,
a(n-1)+binomial(2*n-3, n-3))
end:
seq(a(n), n=0..28); # Alois P. Heinz, Apr 15 2024
# Second Maple program:
A371965 := series((exp(2*x)*BesselI(0, 2*x)-1)/2-exp(x)*(int(BesselI(0, 2*x)*exp(x), x)), x = 0, 29):
seq(n!*coeff(A371965, x, n), n = 0 .. 28); # Mélika Tebni, Jun 15 2024
MATHEMATICA
CoefficientList[Series[(1-3x-(1-x)Sqrt[1-4x])/(2(1-x) Sqrt[1-4x]), {x, 0, 28}], x]
PROG
(Python)
from math import comb
def A371965(n): return sum(comb((n-i<<1)-3, n-i-3) for i in range(n-2)) # Chai Wah Wu, Apr 15 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefano Spezia, Apr 14 2024
STATUS
approved