OFFSET
0,3
COMMENTS
A sequence of positive integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.
LINKS
MathWorld, Unimodal Sequence
EXAMPLE
The a(8) = 21 partitions:
(8) (44) (2222)
(53) (332) (22211)
(62) (422) (32111)
(71) (431) (221111)
(521) (3311) (311111)
(611) (4211) (2111111)
(5111) (41111) (11111111)
Missing from this list is only (3221).
MATHEMATICA
unimodQ[q_]:=Or[Length[q]<=1, If[q[[1]]<=q[[2]], unimodQ[Rest[q]], OrderedQ[Reverse[q]]]]
Table[Length[Select[IntegerPartitions[n], unimodQ[-Length/@Split[#]]&]], {n, 0, 30}]
CROSSREFS
The non-negated version is A332280.
The complement is counted by A332639.
The Heinz numbers of partitions not in this class are A332642.
The case of 0-appended differences (instead of run-lengths) is A332728.
Unimodal compositions are A001523.
Partitions whose run lengths are not unimodal are A332281.
Heinz numbers of partitions with non-unimodal run-lengths are A332282.
Compositions whose negation is unimodal are A332578.
Compositions whose run-lengths are unimodal are A332726.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 25 2020
STATUS
approved