|
|
A352524
|
|
Irregular triangle read by rows where T(n,k) is the number of integer compositions of n with k excedances (parts above the diagonal), all zeros removed.
|
|
18
|
|
|
1, 1, 1, 1, 2, 2, 3, 5, 6, 9, 1, 11, 18, 3, 21, 35, 8, 41, 67, 20, 80, 131, 44, 1, 157, 257, 94, 4, 310, 505, 197, 12, 614, 996, 406, 32, 1218, 1973, 825, 80, 2421, 3915, 1669, 186, 1, 4819, 7781, 3364, 415, 5, 9602, 15486, 6762, 901, 17, 19147, 30855, 13567, 1918, 49
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
EXAMPLE
|
Triangle begins:
1
1
1 1
2 2
3 5
6 9 1
11 18 3
21 35 8
41 67 20
80 131 44 1
157 257 94 4
310 505 197 12
614 996 406 32
For example, row n = 5 counts the following compositions:
(113) (5) (23)
(122) (14)
(1112) (32)
(1121) (41)
(1211) (131)
(11111) (212)
(221)
(311)
(2111)
|
|
MATHEMATICA
|
pd[y_]:=Length[Select[Range[Length[y]], #<y[[#]]&]];
DeleteCases[Table[Length[Select[Join@@ Permutations/@IntegerPartitions[n], pd[#]==k&]], {n, 0, 10}, {k, 0, n}], 0, {2}]
|
|
PROG
|
(PARI)
S(v, u)={vector(#v, k, sum(i=1, k-1, v[k-i]*u[i]))}
T(n)={my(v=vector(1+n), s); v[1]=1; s=v; for(i=1, n, v=S(v, vector(n, j, if(j>i, 'x, 1))); s+=v); [Vecrev(p) | p<-s]}
{ my(A=T(12)); for(n=1, #A, print(A[n])) } \\ Andrew Howroyd, Jan 02 2023
|
|
CROSSREFS
|
The opposite version for partitions is A114088.
The weak version for partitions is A115994.
The corresponding rank statistic is A352516.
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|