The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A333679 Sum of the heights of 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. 4
0, 0, 0, 1, 3, 8, 20, 53, 137, 375, 1035, 2878, 7988, 22308, 62642, 176692, 499818, 1418228, 4035568, 11512449, 32916181, 94313011, 270757747, 778694171, 2243200705, 6471953522, 18699169766, 54098598824, 156706773404, 454457344755, 1319382151919, 3834346819731 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
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, h) option remember;
`if`(x=0, h, add(b(x-1, y+j, j, max(h, y)),
j=max(t-1, -y)..min(x*(x-1)/2-y, t+1)))
end:
a:= n-> b(n, 0$3):
seq(a(n), n=0..32);
MATHEMATICA
b[x_, y_, t_, h_] := b[x, y, t, h] =
If[x == 0, h, Sum[b[x - 1, y + j, j, Max[h, y]],
{j, Max[t - 1, -y], Min[x(x - 1)/2 - y, t + 1]}]];
a[n_] := b[n, 0, 0, 0];
a /@ Range[0, 32] (* Jean-François Alcover, Apr 26 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A295346 A027220 A305823 * A230953 A026995 A018035
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 01 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 May 28 22:13 EDT 2024. Contains 372921 sequences. (Running on oeis4.)