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.
LINKS
Wikipedia, Permutation pattern
FORMULA
a(n) = A001221(n)! if n is cubefree, otherwise 0.
EXAMPLE
The a(90) = 6 permutations are (1,2,2,3), (1,3,2,2), (2,2,1,3), (2,2,3,1), (3,1,2,2), (3,2,2,1).
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Length[Select[Permutations[primeMS[n]], !MatchQ[#, {___, x_, __, x_, ___}]&]], {n, 100}]
CROSSREFS
Permutations of prime indices are counted by A008480.
Permutations of prime indices with equal parts contiguous are A333175.
STC-numbers of permutations of prime indices are A333221.
(1,2,1) and (2,1,2)-avoiding permutations of prime indices are A333175.
Numbers whose prime indices are inseparable are A335448.
(1,2,1) or (2,1,2)-matching permutations of prime indices are A335460.
(1,2,1) and (2,1,2)-matching permutations of prime indices are A335462.
Strict permutations of prime indices are counted by A335489.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 21 2020
STATUS
approved