login
A238122
Irregular triangle read by rows: T(n,k) gives the number of ballot sequences of length n having k descents, n>=0, 0<=k<=A083920(n-1).
14
1, 1, 2, 3, 1, 5, 5, 7, 16, 3, 11, 43, 21, 1, 15, 99, 101, 17, 22, 215, 373, 145, 9, 30, 430, 1174, 836, 146, 4, 42, 834, 3337, 3846, 1324, 112, 1, 56, 1529, 8642, 15002, 8786, 1615, 66, 77, 2765, 21148, 52132, 47013, 15403, 1582, 32, 101, 4792, 48713, 164576, 214997, 112106, 21895, 1310, 14
OFFSET
0,3
COMMENTS
Same as A238121, with zeros omitted.
T(2n,n) gives A241804.
T(2n+1,n) gives A241805.
Row sums are A000085.
T(n*(n+1)/2,n*(n-1)/2) = 1.
LINKS
Joerg Arndt and Alois P. Heinz, Rows n = 0..50, flattened
EXAMPLE
T(5,0) = 7: [1,1,1,1,1], [1,1,1,1,2], [1,1,1,2,2], [1,1,1,2,3], [1,1,2,2,3], [1,1,2,3,4], [1,2,3,4,5].
T(5,1) = 16: [1,1,1,2,1], [1,1,2,1,1], [1,1,2,1,2], [1,1,2,1,3], [1,1,2,2,1], [1,1,2,3,1], [1,1,2,3,2], [1,2,1,1,1], [1,2,1,1,2], [1,2,1,1,3], [1,2,1,2,3], [1,2,1,3,4], [1,2,3,1,1], [1,2,3,1,2], [1,2,3,1,4], [1,2,3,4,1].
T(5,2) = 3: [1,2,1,2,1], [1,2,1,3,1], [1,2,1,3,2].
Triangle starts:
00: 1;
01: 1;
02: 2;
03: 3, 1;
04: 5, 5;
05: 7, 16, 3;
06: 11, 43, 21, 1;
07: 15, 99, 101, 17;
08: 22, 215, 373, 145, 9;
09: 30, 430, 1174, 836, 146, 4;
10: 42, 834, 3337, 3846, 1324, 112, 1;
11: 56, 1529, 8642, 15002, 8786, 1615, 66;
12: 77, 2765, 21148, 52132, 47013, 15403, 1582, 32;
13: 101, 4792, 48713, 164576, 214997, 112106, 21895, 1310, 14;
14: 135, 8216, 108147, 484609, 874413, 672015, 215849, 26159, 932, 5;
...
MAPLE
b:= proc(n, v, l) option remember; `if`(n<1, 1, expand(
add(`if`(i=1 or l[i-1]>l[i], `if`(i<v, x, 1)*
b(n-1, i, subsop(i=l[i]+1, l)), 0), i=1..nops(l))+
b(n-1, nops(l)+1, [l[], 1])))
end:
T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n-1, 1, [1])):
seq(T(n), n=0..14);
MATHEMATICA
b[n_, v_, l_List] := b[n, v, l] = If[n<1, 1, Expand[Sum[If[i == 1 || l[[i-1]] > l[[i]], If[i<v, x, 1]*b[n-1, i, ReplacePart[l, i -> l[[i]]+1]], 0], {i, 1, Length[ l ]}] + b[n-1, Length[l]+1, Append[l, 1]]]]; T[n_] := Function[{p}, Table[ Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n-1, 1, {1}]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Feb 11 2015, after Maple *)
CROSSREFS
Sequence in context: A336364 A294223 A355618 * A214059 A195508 A049274
KEYWORD
nonn,tabf
AUTHOR
Joerg Arndt and Alois P. Heinz, Feb 21 2014
STATUS
approved