A333105
Number of 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)}.
Original entry on oeis.org
1, 1, 2, 4, 9, 21, 51, 128, 331, 880, 2402, 6724, 19285, 56612, 169908, 520723, 1627477, 5180064, 16766824, 55112302, 183710312, 620213500, 2118094664, 7309077920, 25459737905, 89438446602, 316606738516, 1128566016617, 4048230694964, 14604517154115
Offset: 0
-
b:= proc(x, y) option remember; `if`(x=0, 1, add(
b(x-1, y+j), j=-min(1, y)..min(max(1, y), x-y-1)))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..29);
-
b[x_, y_] := b[x, y] = If[x == 0, 1, Sum[b[x - 1, y + j],
{j, -Min[1, y], Min[Max[1, y], x - y - 1]}]];
a[n_] := b[n, 0];
a /@ Range[0, 29] (* Jean-François Alcover, Mar 30 2021, after Alois P. Heinz *)
A333608
Sum of the heights of 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)}.
Original entry on oeis.org
0, 0, 1, 3, 9, 25, 70, 200, 584, 1742, 5304, 16471, 52120, 167885, 549856, 1828897, 6170108, 21087458, 72923515, 254880303, 899454849, 3201729220, 11486266036, 41497996004, 150879471934, 551723923040, 2027990653855, 7489507917594, 27777837416779, 103427750936183
Offset: 0
-
b:= proc(x, y, h) option remember;
`if`(x=0, h, add(b(x-1, y+j, max(y, h)),
j=-min(1, y)..min(max(1, y), x-y-1)))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..29);
-
b[x_, y_, h_] := b[x, y, h] = If[x == 0, h, Sum[b[x - 1, y + j, Max[y, h]], {j, -Min[1, y], Min[Max[1, y], x - y - 1]}]];
a[n_] := b[n, 0, 0];
a /@ Range[0, 29] (* Jean-François Alcover, May 12 2020, after Maple *)
A333071
Total area under all lattice paths from (0,0) to (n,0) that do not go below the x-axis, and at (x,y) only allow steps (1,v) with v in {-1,0,1,...,y+1}.
Original entry on oeis.org
0, 0, 1, 4, 16, 63, 239, 895, 3343, 12503, 46905, 176620, 667664, 2533699, 9650737, 36887383, 141448958, 544022417, 2098082719, 8111788699, 31434420426, 122068414186, 474932563378, 1851059631879, 7226108097869, 28250493771358, 110594307388370, 433488248791630
Offset: 0
-
b:= proc(x, y) option remember; `if`(x=0, [1, 0],
add(`if`(x+j>y, (p-> p+[0, p[1]*(y-j/2)])(
b(x-1, y-j)), 0), j=-1-y..min(1, y)))
end:
a:= n-> b(n, 0)[2]:
seq(a(n), n=0..30);
-
b[x_, y_] := b[x, y] = If[x == 0, {1, 0},
Sum[If[x + j > y, With[{p = b[x - 1, y - j]}, p +
{0, p[[1]] (y - j/2)}], 0], {j, -1 - y, Min[1, y]}]];
a[n_] := b[n, 0][[2]];
a /@ Range[0, 30] (* Jean-François Alcover, Apr 05 2021, after Alois P. Heinz *)
A333106
Total number of nodes summed over 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)}.
Original entry on oeis.org
1, 2, 6, 16, 45, 126, 357, 1024, 2979, 8800, 26422, 80688, 250705, 792568, 2548620, 8331568, 27667109, 93241152, 318569656, 1102246040, 3857916552, 13644697000, 48716177272, 175417870080, 636493447625, 2325399611652, 8548381939932, 31599848465276
Offset: 0
-
b:= proc(x, y) option remember; `if`(x=0, 1, add(
b(x-1, y+j), j=-min(1, y)..min(max(1, y), x-y-1)))
end:
a:= n-> (n+1)*b(n, 0):
seq(a(n), n=0..29);
-
b[x_, y_] := b[x, y] = If[x == 0, 1,
Sum[b[x-1, y+j], {j, -Min[1, y], Min[Max[1, y], x-y-1]}]];
a[n_] := (n+1) b[n, 0];
a /@ Range[0, 29] (* Jean-François Alcover, Apr 05 2021, after Alois P. Heinz *)
Showing 1-4 of 4 results.
Comments