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 *)
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 *)
A333070
Total number of nodes summed over 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
1, 2, 6, 16, 45, 132, 399, 1240, 3951, 12870, 42746, 144420, 495300, 1721202, 6051150, 21493136, 77039070, 278377452, 1013187920, 3711505380, 13675028346, 50649452084, 188482525039, 704409735912, 2642825539375, 9950643710800, 37587291143103, 142403408032648
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-> (n+1)*b(n, 0):
seq(a(n), n=0..30);
-
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_] := (n+1) b[n, 0];
a /@ Range[0, 30] (* Jean-François Alcover, Apr 05 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 *)
A337067
Number of nonnegative lattice paths from (0,0) to (n,0) where the allowed steps at (x,y) are (h,v) with h in {1..max(1,y)} and v in {-1,0,1}.
Original entry on oeis.org
1, 1, 2, 4, 9, 22, 57, 156, 447, 1332, 4103, 12999, 42176, 139638, 470353, 1607861, 5566543, 19484810, 68859862, 245404650, 881081082, 3184214751, 11575346316, 42300703150, 155316289004, 572725968326, 2120154235114, 7876449597257, 29356608044002
Offset: 0
-
b:= proc(x, y) option remember; `if`(x=0, 1, add(add(
b(x-h, y-v), h=1..min(x-y+v, max(1, y-v))), v=-1..min(y, 1)))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..30);
-
b[x_, y_] := b[x, y] = If[x == 0, 1, Sum[Sum[
b[x-h, y-v], {h, 1, Min[x-y+v, Max[1, y-v]]}], {v, -1, Min[y, 1]}]];
a[n_] := b[n, 0];
a /@ Range[0, 30] (* Jean-François Alcover, Dec 22 2020, after Alois P. Heinz *)
A348202
Number of nonnegative lattice paths from (0,0) to (n,0) using steps in {(1,-4), (1,-1), (1,0), (1,1)}.
Original entry on oeis.org
1, 1, 2, 4, 9, 22, 57, 155, 435, 1249, 3645, 10770, 32143, 96747, 293359, 895373, 2748803, 8483035, 26302248, 81896176, 255967640, 802790415, 2525691721, 7968972542, 25209580699, 79942927651, 254077293876, 809192984902, 2582113984084, 8254273128869
Offset: 0
-
b:= proc(x, y) option remember; `if`(y<0 or y>x, 0,
`if`(x=0, 1, add(b(x-1, y-j), j=[-4, -1, 0, 1])))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..31);
-
b[x_, y_] := b[x, y] = If[y < 0 || y > x, 0, If[x == 0, 1, Sum[b[x - 1, y - j], {j, {-4, -1, 0, 1}}]]];
a[n_] := b[n, 0];
Table[a[n], {n, 0, 31}] (* Jean-François Alcover, Dec 28 2022, after Alois P. Heinz *)
Showing 1-6 of 6 results.