A333069
Number of 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
1, 1, 2, 4, 9, 22, 57, 155, 439, 1287, 3886, 12035, 38100, 122943, 403410, 1343321, 4531710, 15465414, 53325680, 185575269, 651191826, 2302247822, 8194892393, 29350405663, 105713021575, 382717065800, 1392121894189, 5085836001166, 18654616951435, 68678029247822
Offset: 0
-
b:= proc(x, y) option remember; `if`(x=0, 1, add(
`if`(x+j>y, b(x-1, y-j), 0), j=-1-y..min(1, y)))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..33);
-
b[x_, y_] := b[x, y] = If[x == 0, 1, Sum[If[x + j > y, b[x - 1, y - j], 0], {j, -1 - y, Min[1, y]}]];
a[n_] := b[n, 0];
a /@ Range[0, 33] (* Jean-François Alcover, Dec 19 2020, after Alois P. Heinz *)
A333504
Sum of the heights of 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, 3, 9, 28, 88, 282, 921, 3058, 10302, 35159, 121406, 423704, 1493046, 5307276, 19014642, 68609686, 249149529, 910000728, 3341113126, 12325295866, 45664033813, 169846998495, 634020229888, 2374550269819, 8920273989351, 33604033638696, 126919824985533
Offset: 0
-
b:= proc(x, y, h) option remember; `if`(x=0, h, add((t->
`if`(x>t, b(x-1, t, max(h, t)), 0))(y-j), j=-1-y..min(1, y)))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..33);
-
b[x_, y_, h_] := b[x, y, h] = If[x == 0, h, Sum[With[{t = y - j},
If[x > t, b[x - 1, t, Max[h, t]], 0]], {j, -1 - y, Min[1, y]}]];
a[n_] := b[n, 0, 0];
a /@ Range[0, 33] (* Jean-François Alcover, Apr 26 2021, after Alois P. Heinz *)
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.