Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A333107
Total area under all nonnegative lattice paths from (0,0) to (n,0) where the allowed steps at (x,y) are (1,v) with v in {-1,0,...,max(y,1)}.
5
0, 0, 1, 4, 16, 56, 190, 637, 2131, 7156, 24215, 82758, 285991, 999715, 3534394, 12631420, 45601759, 166169360, 610650687, 2261234467, 8430749631, 31625520000, 119281312293, 452077280484, 1720796968459, 6575385383602, 25212139233077, 96970372087853
OFFSET
0,4
LINKS
MAPLE
b:= proc(x, y) option remember; `if`(x=0, [1, 0], add(
(p-> p+[0, p[1]*(y+j/2)])(b(x-1, y+j)),
j=-min(1, y)..min(max(1, y), x-y-1)))
end:
a:= n-> b(n, 0)[2]:
seq(a(n), n=0..29);
MATHEMATICA
b[x_, y_] := b[x, y] = If[x == 0, {1, 0}, Sum[
Function[p, p + {0, p[[1]]*(y + j/2)}][b[x - 1, y + j]],
{j, -Min[1, y], Min[Max[1, y], x - y - 1]}]];
a[n_] := b[n, 0][[2]];
a /@ Range[0, 29] (* Jean-François Alcover, Apr 05 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 07 2020
STATUS
approved