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 A369432 #18 Jul 24 2025 10:51:55 %S A369432 1,1,3,6,16,37,95,230,582,1434,3606,8952,22446,55917,140007,349374, %T A369432 874150,2183230,5460506,13643972,34118328,85270626,213205958, %U A369432 532926716,1332420796,3330739972,8327221380,20816939100,52043684970,130105200765,325267849335,813155081070 %N A369432 Number of Dyck excursions with catastrophes from (0,0) to (n,0). %C A369432 A Dyck excursion is a lattice path with steps U = (1,1) and D = (1,-1) that does not go below the x-axis and ends at the x-axis. %C A369432 A catastrophe is a step C = (1,-k) from altitude k to altitude 0 for k >= 0. %H A369432 Alois P. Heinz, <a href="/A369432/b369432.txt">Table of n, a(n) for n = 0..2514</a> %H A369432 Cyril Banderier and Michael Wallner, <a href="https://arxiv.org/abs/1707.01931">Lattice paths with catastrophes</a>, arXiv:1707.01931 [math.CO], 2017, p.7. %F A369432 G.f.: (1 - sqrt(1 - 4*z^2))*(2*z - 1)/(z^2*(6*z - 3 + sqrt(1 - 4*z^2))). %F A369432 a(n) ~ 3/8*(5/2)^n. %e A369432 For n = 3 the a(3) = 6 solutions are UUC, UDC, UCC, CUD, CUC, CCC. %e A369432 For n = 4 the a(4) = 16 solutions are UUUC, UUDD, UUDC, UUCC, UDUD, UDUC, UDCC, UCUD, UCUC, UCCC, CUUC, CUDC, CUCC, CCUD, CCUC, CCCC. %p A369432 u1 := solve(1 - z*(1/u + u), u)[2]; %p A369432 M := (1 - u1)/(1 - 2*z); %p A369432 E := u1/z; %p A369432 F := E/(-M*z + 1); %p A369432 series(F, z, 33); %p A369432 # second Maple program: %p A369432 b:= proc(x, y) option remember; `if`(x=0, `if`(y=0, 1, 0), %p A369432 b(x-1, 0)+`if`(y>0, b(x-1, y-1), 0)+b(x-1, y+1)) %p A369432 end: %p A369432 a:= n-> b(n, 0): %p A369432 seq(a(n), n=0..31); # _Alois P. Heinz_, Jan 23 2024 %t A369432 b[x_, y_] := b[x, y] = If[x == 0, If[y == 0, 1, 0], b[x-1, 0] + If[y > 0, b[x-1, y-1], 0] + b[x-1, y+1]]; %t A369432 a[n_] := b[n, 0]; %t A369432 Table[a[n], {n, 0, 31}] (* _Jean-François Alcover_, Jul 24 2025, after _Alois P. Heinz_ *) %o A369432 (PARI) my(N=44,z='z+O('z^N)); Vec((1 - sqrt(1 -4*z^2))*(2*z - 1)/(z^2*(6*z - 3 + sqrt(1 - 4*z^2)))) %Y A369432 Cf. A054341 (Dyck meanders with catastrophes). %Y A369432 Cf. A224747 (different model of catastrophes). %K A369432 nonn,walk %O A369432 0,3 %A A369432 _Florian Schager_, Jan 23 2024