login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A371964
a(n) is the sum of all symmetric valleys in the set of Catalan words of length n.
5
0, 0, 0, 0, 1, 7, 35, 155, 650, 2652, 10660, 42484, 168454, 665874, 2627130, 10353290, 40775045, 160534895, 631970495, 2487938015, 9795810125, 38576953505, 151957215305, 598732526105, 2359771876175, 9303298456451, 36688955738099, 144732209103699, 571117191135799
OFFSET
0,6
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, pp. 16-17.
FORMULA
G.f.: (1 - 4*x + 2*x^2 - (1 - 2*x)*sqrt(1 - 4*x))/(2*(1 - x)*sqrt(1 - 4*x)).
a(n) = (3*n - 2)*A000108(n-1) - A079309(n) for n > 0.
a(n) ~ 2^(2*n)/(12*sqrt(Pi*n)).
a(n)/A371963(n) ~ 1/2.
a(n) - a(n-1) = A002694(n-2).
EXAMPLE
a(4) = 1 because there is 1 Catalan word of length 4 with one symmetric valley: 0101.
a(5) = 7 because there are 7 Catalan words of length 5 with one symmetric valley: 00101, 01001, 01010, 01011, 01012, 01101, and 01212 (see example at p. 16 in Baril et al.).
MAPLE
a:= proc(n) option remember; `if`(n<4, 0,
a(n-1)+binomial(2*n-4, n-4))
end:
seq(a(n), n=0..28); # Alois P. Heinz, Apr 15 2024
MATHEMATICA
CoefficientList[Series[(1-4x+2x^2-(1-2x)Sqrt[1-4x])/(2(1-x) Sqrt[1-4x]), {x, 0, 29}], x]
PROG
(Python)
from math import comb
def A371964(n): return sum(comb((n-i<<1)-4, n-i-4) for i in range(n-3)) # Chai Wah Wu, Apr 15 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefano Spezia, Apr 14 2024
STATUS
approved