login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A225015 Number of sawtooth patterns of length 1 in all Dyck paths of semilength n. 2

%I #20 Apr 04 2024 10:17:04

%S 0,1,1,5,18,66,245,918,3465,13156,50193,192270,739024,2848860,

%T 11009778,42642460,165480975,643281480,2504501625,9764299710,

%U 38115568260,148955040300,582714871830,2281745337300,8942420595810,35074414899576,137672461877850,540756483094828

%N Number of sawtooth patterns of length 1 in all Dyck paths of semilength n.

%C A sawtooth pattern of length 1 is UD not followed by UD.

%C First differences of A024482.

%H Alois P. Heinz, <a href="/A225015/b225015.txt">Table of n, a(n) for n = 0..1000</a>

%F a(0)=0, a(1)=1, a(n) = A024482(n) - A024482(n-1) for n >= 2.

%F From _G. C. Greubel_, Apr 03 2024: (Start)

%F G.f.: (1-x)^2*(1 - sqrt(1-4*x))/(2*sqrt(1-4*x)).

%F 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)

%p a:= proc(n) option remember; `if`(n<4, [0, 1, 1, 5][n+1],

%p (n-1)*(3*n-4)*(4*n-10)*a(n-1)/(n*(n-2)*(3*n-7)))

%p end:

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Apr 24 2013

%t 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 *)

%o (Magma)

%o A024482:= func< n | (3*n-2)*Catalan(n-1)/2 >;

%o A225015:= func< n | n le 2 select Floor((n+1)/2) else A024482(n) - A024482(n-1) >;

%o [A225015(n): n in [0..40]]; // _G. C. Greubel_, Apr 03 2024

%o (SageMath)

%o def A024482(n): return (3*n-2)*catalan_number(n-1)/2

%o def A225015(n): return floor((n+1)/2) if n<3 else A024482(n) - A024482(n-1)

%o [A225015(n) for n in range(41)] # _G. C. Greubel_, Apr 03 2024

%Y Cf. A024482, A097613.

%K nonn

%O 0,4

%A _David Scambler_, Apr 23 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)