login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333647 Number of 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. 6
1, 1, 1, 2, 4, 8, 16, 34, 74, 169, 397, 953, 2319, 5732, 14370, 36466, 93468, 241767, 630499, 1656372, 4380128, 11652459, 31168689, 83788315, 226272531, 613632359, 1670604607, 4564607998, 12513715526, 34412992018, 94912212872, 262484672621, 727770127583 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
The maximal height in all paths of length n is floor(ceil(n/2)^2/4) = A008642(n-3) for n>2.
LINKS
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-> b(n, 0$2):
seq(a(n), n=0..40);
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_] := b[n, 0, 0];
a /@ Range[0, 40] (* Jean-François Alcover, Apr 26 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A096812 A006981 A003427 * A045648 A248890 A308245
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 31 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)