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

A225015
Number of sawtooth patterns of length 1 in all Dyck paths of semilength n.
2
0, 1, 1, 5, 18, 66, 245, 918, 3465, 13156, 50193, 192270, 739024, 2848860, 11009778, 42642460, 165480975, 643281480, 2504501625, 9764299710, 38115568260, 148955040300, 582714871830, 2281745337300, 8942420595810, 35074414899576, 137672461877850, 540756483094828
OFFSET
0,4
COMMENTS
A sawtooth pattern of length 1 is UD not followed by UD.
First differences of A024482.
LINKS
FORMULA
a(0)=0, a(1)=1, a(n) = A024482(n) - A024482(n-1) for n >= 2.
From G. C. Greubel, Apr 03 2024: (Start)
G.f.: (1-x)^2*(1 - sqrt(1-4*x))/(2*sqrt(1-4*x)).
E.g.f.: -(1/4)*(2-4*x+x^2) + (1/12)*Exp(2*x)*((6-12*x+43*x^2-24*x^3) *BesselI(0, 2*x) - 4*x*(7-5*x)*BesselI(1,2*x) - 3*x^2*(13-8*x)* BesselI(2,2*x)). (End)
MAPLE
a:= proc(n) option remember; `if`(n<4, [0, 1, 1, 5][n+1],
(n-1)*(3*n-4)*(4*n-10)*a(n-1)/(n*(n-2)*(3*n-7)))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Apr 24 2013
MATHEMATICA
Join[{0, 0, 1}, Table[(Binomial[2n, n]-Binomial[2n-2, n-1])/2, {n, 2, 25}]] // Differences (* Jean-François Alcover, Nov 12 2020 *)
PROG
(Magma)
A024482:= func< n | (3*n-2)*Catalan(n-1)/2 >;
A225015:= func< n | n le 2 select Floor((n+1)/2) else A024482(n) - A024482(n-1) >;
[A225015(n): n in [0..40]]; // G. C. Greubel, Apr 03 2024
(SageMath)
def A024482(n): return (3*n-2)*catalan_number(n-1)/2
def A225015(n): return floor((n+1)/2) if n<3 else A024482(n) - A024482(n-1)
[A225015(n) for n in range(41)] # G. C. Greubel, Apr 03 2024
CROSSREFS
Sequence in context: A184309 A051944 A153373 * A371871 A166677 A318062
KEYWORD
nonn
AUTHOR
David Scambler, Apr 23 2013
STATUS
approved