OFFSET
0,3
COMMENTS
A Dyck type lattice path has the steps (1,1) or (1,-1) and never passes below the x-axis.
For k>=n, the number of Dyck-type lattice paths is 2^n.
The sequence completes A322291 by adding a diagonal of powers of 2.
LINKS
John Tyler Rascoe, Rows n = 0..140, flattened
FORMULA
T(n,k) = Sum_{i = 0..k} binomial(n, floor((n-k)/2)+i).
T(n,k) = T(n-1,k-1)+T(n-1,k+1), for all n>=2 and 1<=k<=n-2.
EXAMPLE
n | k=0 1 2 3 4 5 6 7
---+---------------------------------------
0 | 1
1 | 1 2
2 | 2 3 4
3 | 3 6 7 8
4 | 6 10 14 15 16
5 | 10 20 25 30 31 32
6 | 20 35 50 56 62 63 64
7 | 35 70 92 112 119 126 127 128
MAPLE
a:=(n, k)->sum(binomial(n, floor((1/2)*(n-k))+i), i = 0..k):
seq(seq(a(n, k), k = 0..n), n = 0..11);
PROG
(Python)
from math import comb
def A375659(n, k):
return sum(comb(n, i+(n-k)//2) for i in range(k+1)) # John Tyler Rascoe, Sep 04 2024
CROSSREFS
KEYWORD
AUTHOR
Marilena Jianu, Aug 23 2024
STATUS
approved