OFFSET
0,7
COMMENTS
A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.
A composition of n is a finite sequence of positive integers summing to n.
LINKS
MathWorld, Unimodal Sequence
EXAMPLE
The a(5) = 1 through a(7) = 14 compositions:
(212) (213) (1213)
(312) (1312)
(1212) (2113)
(2112) (2122)
(2121) (2131)
(2212)
(3112)
(3121)
(11212)
(12112)
(12121)
(21112)
(21121)
(21211)
MATHEMATICA
normQ[m_]:=m=={}||Union[m]==Range[Max[m]];
unimodQ[q_]:=Or[Length[q]<=1, If[q[[1]]<=q[[2]], unimodQ[Rest[q]], OrderedQ[Reverse[q]]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], normQ[#]&&!unimodQ[#]&]], {n, 0, 10}]
CROSSREFS
Not requiring non-unimodality gives A107429.
Not requiring the covering condition gives A115981.
The complement is counted by A227038.
Unimodal compositions are A001523.
Non-unimodal permutations are A059204.
Non-unimodal normal sequences are A328509.
Numbers whose unsorted prime signature is not unimodal are A332282.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 02 2020
STATUS
approved