A378850 a(n) is the total number of paths starting at (0, 0), ending at (n, 0), consisting of steps (1, 1), (1, 0), (1, -2), and staying on or above y = -2.
1, 1, 1, 4, 13, 31, 73, 190, 505, 1316, 3431, 9065, 24122, 64325, 172082, 462344, 1246685, 3371135, 9140289, 24847422, 67708743, 184906614, 505986933, 1387240401, 3810083424, 10481797131, 28880894706, 79692785251, 220203155689, 609242057143, 1687666776031
Offset: 0
Keywords
Examples
For n = 3, the a(3)=4 paths are DUU, HHH, UDU, UUD, where U=(1,1), D=(1,-2) and H=(1,0).
Programs
-
Maple
a := n -> hypergeom([4/3, 5/3, (1-n)/3, (2-n)/3, -n/3], [1/3, 2/3, 5/2, 2], -27/4): seq(simplify(a(n)), n = 0..30); # Peter Luschny, Dec 18 2024
-
PARI
a(n) = sum(k=0, floor(n/3), binomial(n, k*3)*binomial(3*k+3, k+1)/(2*k+3)) \\ Thomas Scheuerle, Dec 09 2024