cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A333679 #16 Apr 26 2021 05:22:53
%S A333679 0,0,0,1,3,8,20,53,137,375,1035,2878,7988,22308,62642,176692,499818,
%T A333679 1418228,4035568,11512449,32916181,94313011,270757747,778694171,
%U A333679 2243200705,6471953522,18699169766,54098598824,156706773404,454457344755,1319382151919,3834346819731
%N 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.
%C A333679 The maximal height in all paths of length n is floor(ceil(n/2)^2/4) = A008642(n-3) for n>2.
%H A333679 Alois P. Heinz, <a href="/A333679/b333679.txt">Table of n, a(n) for n = 0..100</a>
%H A333679 Alois P. Heinz, <a href="/A333647/a333647.gif">Animation of A333647(9) = 169 paths with height sum a(9) = 375</a>
%H A333679 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%p A333679 b:= proc(x, y, t, h) option remember;
%p A333679       `if`(x=0, h, add(b(x-1, y+j, j, max(h, y)),
%p A333679          j=max(t-1, -y)..min(x*(x-1)/2-y, t+1)))
%p A333679     end:
%p A333679 a:= n-> b(n, 0$3):
%p A333679 seq(a(n), n=0..32);
%t A333679 b[x_, y_, t_, h_] := b[x, y, t, h] =
%t A333679      If[x == 0, h, Sum[b[x - 1, y + j, j, Max[h, y]],
%t A333679      {j, Max[t - 1, -y], Min[x(x - 1)/2 - y, t + 1]}]];
%t A333679 a[n_] := b[n, 0, 0, 0];
%t A333679 a /@ Range[0, 32] (* _Jean-François Alcover_, Apr 26 2021, after _Alois P. Heinz_ *)
%Y A333679 Cf. A008642, A333647, A333678, A333680.
%K A333679 nonn
%O A333679 0,5
%A A333679 _Alois P. Heinz_, Apr 01 2020