OFFSET
0,5
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
Andrew Howroyd, Table of n, a(n) for n = 0..200
EXAMPLE
The a(4) = 4 and a(5) = 18 permutations:
(1,1,1,2) (1,1,1,2,3)
(1,1,2,1) (1,1,1,3,2)
(1,2,1,1) (1,1,2,1,3)
(2,1,1,1) (1,1,2,3,1)
(1,1,3,1,2)
(1,1,3,2,1)
(1,2,1,1,3)
(1,2,3,1,1)
(1,3,1,1,2)
(1,3,2,1,1)
(2,1,1,1,3)
(2,1,1,3,1)
(2,1,3,1,1)
(2,3,1,1,1)
(3,1,1,1,2)
(3,1,1,2,1)
(3,1,2,1,1)
(3,2,1,1,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, 0, 10}]
PROG
(PARI) \\ See A335452 for count.
a(n)={my(sig=factor(n!)[, 2]); vecsum(sig)!/vecprod([k! | k<-sig]) - count(sig)} \\ Andrew Howroyd, Apr 17 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 03 2020
EXTENSIONS
a(11)-a(13) from Vaclav Kotesovec, Jul 07 2020
Terms a(14) and beyond from Andrew Howroyd, Apr 17 2021
STATUS
approved