OFFSET
0,6
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Manosij Ghosh Dastidar and Michael Wallner, Bijections and congruences involving lattice paths and integer compositions, arXiv:2402.17849 [math.CO], 2024. See p. 15.
Wikipedia, Counting lattice paths
EXAMPLE
. a(2) = 1: /\/\ .
.
. a(5) = 3:
.
. /\/\ /\/\ /\/\
. /\/\/ \ /\/ \/\ / \/\/\ .
MAPLE
b:= proc(n, j) option remember;
`if`(n=j or n=0, 1, add(b(n-j, i)*i*(i-1)/2
*binomial(j-1, i-3), i=3..min(j+2, n-j)))
end:
a:= n-> b(n, 2):
seq(a(n), n=0..35);
MATHEMATICA
b[n_, j_] := b[n, j] = If[n == j || n == 0, 1, Sum[b[n - j, i]*i*(i - 1)/2* Binomial[j - 1, i - 3], {i, 3, Min[j + 2, n - j]}]];
a[n_] := b[n, 2];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 25 2018, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 01 2017
STATUS
approved