|
|
A332833
|
|
Number of compositions of n whose run-lengths are neither weakly increasing nor weakly decreasing.
|
|
20
|
|
|
0, 0, 0, 0, 0, 0, 3, 8, 27, 75, 185, 441, 1025, 2276, 4985, 10753, 22863, 48142, 100583, 208663, 430563, 884407, 1809546, 3690632, 7506774, 15233198, 30851271, 62377004, 125934437, 253936064, 511491634, 1029318958, 2069728850, 4158873540, 8351730223, 16762945432
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
COMMENTS
|
A composition of n is a finite sequence of positive integers summing to n.
|
|
LINKS
|
Andrew Howroyd, Table of n, a(n) for n = 0..1000
MathWorld, Unimodal Sequence
|
|
FORMULA
|
a(n) = 2^(n - 1) - 2 * A332836(n) + A329738(n).
|
|
EXAMPLE
|
The a(6) = 3 and a(7) = 8 compositions:
(1221) (2113)
(2112) (3112)
(11211) (11311)
(12112)
(21112)
(21121)
(111211)
(112111)
|
|
MATHEMATICA
|
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], !Or[LessEqual@@Length/@Split[#], GreaterEqual@@Length/@Split[#]]&]], {n, 0, 10}]
|
|
CROSSREFS
|
The case of partitions is A332641.
The version for unsorted prime signature is A332831.
The version for the compositions themselves (not run-lengths) is A332834.
The complement is counted by A332835.
Unimodal compositions are A001523.
Partitions with weakly increasing run-lengths are A100883.
Compositions that are not unimodal are A115981.
Compositions with equal run-lengths are A329738.
Compositions whose run-lengths are unimodal are A332726.
Compositions whose run-lengths are not unimodal are A332727.
Partitions with weakly increasing or weakly decreasing run-lengths: A332745.
Compositions with weakly increasing run-lengths are A332836.
Compositions that are neither unimodal nor is their negation are A332870.
Cf. A001462, A072704, A072706, A107429, A181819, A329398, A329744, A329746, A329766, A332273, A332640, A332746.
Sequence in context: A066023 A347830 A305049 * A148823 A205503 A242537
Adjacent sequences: A332830 A332831 A332832 * A332834 A332835 A332836
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Gus Wiseman, Feb 29 2020
|
|
EXTENSIONS
|
Terms a(21) and beyond from Andrew Howroyd, Dec 30 2020
|
|
STATUS
|
approved
|
|
|
|