OFFSET
0,8
COMMENTS
A composition of n is a finite sequence of positive integers summing to n.
Also the number of compositions of n with k + 1 maximal strictly decreasing subsequences.
Also the number of compositions of n with k adjacent terms that are equal or decreasing (weak descents).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1325 (rows 0..50)
EXAMPLE
Triangle begins:
1
0 1
0 1 1
0 2 1 1
0 2 4 1 1
0 3 6 5 1 1
0 4 10 10 6 1 1
0 5 17 20 13 7 1 1
0 6 27 38 31 16 8 1 1
0 8 40 69 67 42 19 9 1 1
0 10 58 123 132 101 54 22 10 1 1
0 12 86 202 262 218 139 67 25 11 1 1
0 15 121 332 484 467 324 182 81 28 12 1 1
Row n = 6 counts the following compositions:
(6) (15) (114) (1113) (11112) (111111)
(42) (24) (123) (1122)
(51) (33) (222) (11121)
(321) (132) (1131) (11211)
(141) (1212) (12111)
(213) (1221) (21111)
(231) (1311)
(312) (2112)
(411) (2211)
(2121) (3111)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Length[Split[#, #1>#2&]]==k&]], {n, 0, 12}, {k, 0, n}]
PROG
(PARI) T(n)={my(M=matrix(n+1, n+1)); M[1, 1]=x; for(n=1, n, for(k=1, n, M[1+n, 1+k] = M[1+n, 1+k-1] + x*M[1+n-k, 1+n-k] + (1-x)*M[1+n-k, 1+min(k-1, n-k)])); M[1, 1]=1; vector(n+1, i, Vecrev(M[i, i]))}
{ my(A=T(12)); for(i=1, #A, print(A[i])) } \\ Andrew Howroyd, Jan 19 2023
CROSSREFS
Compositions by length are A007318.
The case of reversed partitions (instead of compositions) is A008284.
The version counting equal adjacencies is A106356.
The case of partitions (instead of compositions) is A133121.
The version counting unequal adjacencies is A238279.
The strict/strong version is A238343.
KEYWORD
nonn,tabl
AUTHOR
Gus Wiseman, Mar 14 2020
STATUS
approved