A333680 Total number of nodes summed over all nonnegative lattice paths from (0,0) to (n,0) such that slopes of adjacent steps differ by at most one, assuming zero slope before and after the paths.
1, 2, 3, 8, 20, 48, 112, 272, 666, 1690, 4367, 11436, 30147, 80248, 215550, 583456, 1588956, 4351806, 11979481, 33127440, 91982688, 256354098, 716879847, 2010919560, 5656813275, 15954441334, 45106324389, 127809023944, 362897750254, 1032389760540, 2942278599032
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..300
- Alois P. Heinz, Animation of A333647(9) = 169 paths with a(9) = 1690 nodes
- Wikipedia, Counting lattice paths
Programs
-
Maple
b:= proc(x, y, t) option remember; `if`(x=0, 1, add( b(x-1, y+j, j), j=max(t-1, -y)..min(x*(x-1)/2-y, t+1))) end: a:= n-> (n+1)*b(n, 0$2): seq(a(n), n=0..36);
-
Mathematica
b[x_, y_, t_] := b[x, y, t] = If[x == 0, 1, Sum[ b[x-1, y+j, j], {j, Max[t-1, -y], Min[x(x-1)/2-y, t+1]}]]; a[n_] := (n+1) b[n, 0, 0]; a /@ Range[0, 36] (* Jean-François Alcover, Apr 26 2021, after Alois P. Heinz *)
Formula
a(n) = (n+1) * A333647(n).