OFFSET
1,6
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.
Also permutations of the multiset of prime indices of n avoiding the patterns (1,2,1), (1,3,2), and (2,3,1).
Also the number divisors of n not divisible by the least prime factor of n. The other divisors are counted by A069157. - Gus Wiseman, Apr 12 2022
LINKS
Eric Weisstein's World of Mathematics, Unimodal Sequence
Wikipedia, Permutation pattern
FORMULA
EXAMPLE
The a(n) permutations for n = 2, 6, 18, 30, 90, 162, 210, 450:
(1) (12) (122) (123) (1223) (12222) (1234) (12233)
(21) (212) (213) (2123) (21222) (2134) (21233)
(221) (312) (2213) (22122) (3124) (22133)
(321) (3122) (22212) (3214) (31223)
(3212) (22221) (4123) (32123)
(3221) (4213) (32213)
(4312) (33122)
(4321) (33212)
(33221)
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, 30}]
CROSSREFS
Dominated by A008480.
The complementary divisors are counted by A069157.
The non-negated version is A332288.
A more interesting version is A332741.
The complement is counted by A333146.
A001523 counts unimodal compositions.
A007052 counts unimodal normal sequences.
A332578 counts compositions whose negation is unimodal.
A332638 counts partitions with unimodal negated run-lengths.
A332642 lists numbers with non-unimodal negated unsorted prime signature.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 09 2020
STATUS
approved