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.
%I A225015 #20 Apr 04 2024 10:17:04 %S A225015 0,1,1,5,18,66,245,918,3465,13156,50193,192270,739024,2848860, %T A225015 11009778,42642460,165480975,643281480,2504501625,9764299710, %U A225015 38115568260,148955040300,582714871830,2281745337300,8942420595810,35074414899576,137672461877850,540756483094828 %N A225015 Number of sawtooth patterns of length 1 in all Dyck paths of semilength n. %C A225015 A sawtooth pattern of length 1 is UD not followed by UD. %C A225015 First differences of A024482. %H A225015 Alois P. Heinz, <a href="/A225015/b225015.txt">Table of n, a(n) for n = 0..1000</a> %F A225015 a(0)=0, a(1)=1, a(n) = A024482(n) - A024482(n-1) for n >= 2. %F A225015 From _G. C. Greubel_, Apr 03 2024: (Start) %F A225015 G.f.: (1-x)^2*(1 - sqrt(1-4*x))/(2*sqrt(1-4*x)). %F A225015 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 A225015 a:= proc(n) option remember; `if`(n<4, [0, 1, 1, 5][n+1], %p A225015 (n-1)*(3*n-4)*(4*n-10)*a(n-1)/(n*(n-2)*(3*n-7))) %p A225015 end: %p A225015 seq(a(n), n=0..30); # _Alois P. Heinz_, Apr 24 2013 %t A225015 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 A225015 (Magma) %o A225015 A024482:= func< n | (3*n-2)*Catalan(n-1)/2 >; %o A225015 A225015:= func< n | n le 2 select Floor((n+1)/2) else A024482(n) - A024482(n-1) >; %o A225015 [A225015(n): n in [0..40]]; // _G. C. Greubel_, Apr 03 2024 %o A225015 (SageMath) %o A225015 def A024482(n): return (3*n-2)*catalan_number(n-1)/2 %o A225015 def A225015(n): return floor((n+1)/2) if n<3 else A024482(n) - A024482(n-1) %o A225015 [A225015(n) for n in range(41)] # _G. C. Greubel_, Apr 03 2024 %Y A225015 Cf. A024482, A097613. %K A225015 nonn %O A225015 0,4 %A A225015 _David Scambler_, Apr 23 2013