OFFSET
0,6
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..300
Wikipedia, Counting lattice paths
MATHEMATICA
b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]]; a[n_]:=If[n==0, 1, Sum[b[n, 2, j], {j, 2, n}]]; Table[a[n], {n, 0, 30}] (* Indranil Ghosh, Aug 09 2017 *)
PROG
(Python)
from sympy.core.cache import cacheit
from sympy import binomial
@cacheit
def b(n, k, j): return 1 if j==n else sum(sum(binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i))*b(n - j, k, i) for i in range(1, n - j + 1))
def a(n): return 1 if n==0 else sum(b(n, 2, j) for j in range(2, n + 1))
print([a(n) for n in range(31)]) # Indranil Ghosh, Aug 09 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 13 2017
STATUS
approved