login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A357655
Total number of nodes summed over all lattice paths from (0,0) to (i,n-2*i) that do not go above the diagonal x=y using steps in {(1,0), (0,1)}.
2
1, 0, 2, 3, 3, 8, 14, 15, 35, 59, 69, 147, 245, 300, 608, 1005, 1269, 2489, 4091, 5280, 10120, 16565, 21735, 40950, 66820, 88815, 165125, 268785, 361005, 664108, 1078904, 1461609, 2665617, 4323643, 5899917, 10682712, 17304516, 23759955, 42759385, 69187281
OFFSET
0,3
LINKS
MAPLE
b:= proc(x, y) option remember; `if`(min(x, y)<0 or y>x, 0, `if`(
max(x, y)=0, [1$2], (p-> p+[0, p[1]])(b(x-1, y)+b(x, y-1))))
end:
a:= n-> add(b(i, n-2*i), i=ceil(n/3)..floor(n/2))[2]:
seq(a(n), n=0..39);
MATHEMATICA
b[x_, y_] := b[x, y] = If[Min[x, y] < 0 || y > x, {0, 0}, If[Max[x, y] == 0, {1, 1}, Function[p, p + {0, p[[1]]}][b[x - 1, y] + b[x, y - 1]]]];
a[n_] := If[n == 1, 0, Sum[b[i, n - 2i], {i, Ceiling[n/3], Floor[n/2]}][[2]]];
Table[a[n], {n, 0, 39}] (* Jean-François Alcover, May 27 2023, after Alois P. Heinz *)
CROSSREFS
Cf. A357654.
Sequence in context: A292498 A108692 A157126 * A297703 A263464 A267563
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Oct 07 2022
STATUS
approved