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. - Gus Wiseman, Mar 05 2020
LINKS
Eric Weisstein's World of Mathematics, Unimodal Sequence
EXAMPLE
a(5) = 1 counting {212}.
a(6) = 5 counting {1212, 2112,2121,213,312}.
a(7) = 17 counting {11212, 12112,12121, 21211, 21121, 21112, 2122, 2212, 2113, 3112, 2131, 3121, 1213, 1312, 412, 214, 313}.
a(8) = 49 = 128 - 79.
a(9) = 126 = 256 - 130.
MATHEMATICA
unimodQ[q_]:=Or[Length[q]<=1, If[q[[1]]<=q[[2]], unimodQ[Rest[q]], OrderedQ[Reverse[q]]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], !unimodQ[#]&]], {n, 0, 10}] (* Gus Wiseman, Mar 05 2020 *)
CROSSREFS
The complement is counted by A001523.
The strict case is A072707.
The case covering an initial interval is A332743.
The version whose negation is not unimodal either is A332870.
Non-unimodal permutations are A059204.
Non-unimodal normal sequences are A328509.
Partitions with non-unimodal run-lengths are A332281.
Numbers whose prime signature is not unimodal are A332282.
Partitions whose 0-appended first differences are not unimodal are A332284.
Non-unimodal permutations of the prime indices of n are A332671.
KEYWORD
easy,nonn
AUTHOR
Alford Arnold, Feb 12 2006
EXTENSIONS
More terms from Brian Kuehn (brk158(AT)psu.edu), Apr 20 2006
a(25) corrected by Georg Fischer, Jun 29 2021
STATUS
approved