OFFSET
1,30
COMMENTS
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.
LINKS
MathWorld, Unimodal Sequence
EXAMPLE
The a(n) permutations for n = 18, 30, 36, 42, 50, 54, 60, 66, 70, 72:
212 213 1212 214 313 2122 1213 215 314 11212
312 2112 412 2212 1312 512 413 12112
2121 2113 12121
2131 21112
3112 21121
3121 21211
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
unimodQ[q_]:=Or[Length[q]<=1, If[q[[1]]<=q[[2]], unimodQ[Rest[q]], OrderedQ[Reverse[q]]]];
Table[Length[Select[Permutations[primeMS[n]], !unimodQ[#]&]], {n, 100}]
CROSSREFS
Dominated by A008480.
The complement is counted by A332288.
A more interesting version is A332672.
Unimodal compositions are A001523.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Non-unimodal normal sequences are A328509.
Heinz numbers of partitions with non-unimodal run-lengths are A332282.
Compositions whose negation is not unimodal are A332669.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 22 2020
STATUS
approved