OFFSET
0,3
COMMENTS
Let V = (e(1),...,e(n)) consist of q 1's and p-q 0's; let V(h) = (e(1),...,e(h)) and m(h) = (#1's in V(h)) - (#0's in V(h)) for h=1,...,n. Then S(p,q,r) is the number of V having r >= max{m(h)}.
FORMULA
T(n, k) = Sum_{0<=j<=k} t(n, j), array t as in A039599.
T(n, k) = binomial(2*n, n) - binomial(2*n, n+k+1). - Peter Luschny, Dec 21 2017
EXAMPLE
The triangle starts:
1
1, 2
2, 5, 6
5, 14, 19, 20
14, 42, 62, 69, 70
42, 132, 207, 242, 251, 252
132, 429, 704, 858, 912, 923, 924
MAPLE
A050157 := (n, k) -> binomial(2*n, n) - binomial(2*n, n+k+1):
seq(seq(A050157(n, k), k=0..n), n=0..10); # Peter Luschny, Dec 21 2017
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
STATUS
approved