OFFSET
0,6
COMMENTS
A composition of n is a finite sequence of positive integers summing to n.
Also compositions whose run-lengths are not weakly decreasing.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = 2^(n - 1) - A332836(n).
EXAMPLE
The a(4) = 1 through a(6) = 8 compositions:
(112) (113) (114)
(221) (1113)
(1112) (1131)
(1121) (1221)
(2112)
(11112)
(11121)
(11211)
For example, the composition (2,1,1,2) has run-lengths (1,2,1), which are not weakly increasing, so (2,1,1,2) is counted under a(6).
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], !LessEqual@@Length/@Split[#]&]], {n, 0, 10}]
CROSSREFS
The version for the compositions themselves (not run-lengths) is A056823.
The case without weakly decreasing run-lengths either is A332833.
The complement is counted by A332836.
Compositions that are not unimodal are A115981.
Compositions with equal run-lengths are A329738.
Compositions whose run-lengths are not unimodal are A332727.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 29 2020
EXTENSIONS
Terms a(21) and beyond from Andrew Howroyd, Dec 30 2020
STATUS
approved