OFFSET
1,8
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
FORMULA
EXAMPLE
The prime indices of 45 are {2,2,3}, with product 12 and sum 7, so a(45) = 5.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Times@@primeMS[n]-Total[primeMS[n]], {n, 100}]
dps[n_]:=Module[{pi=Flatten[Table[PrimePi[#[[1]]], #[[2]]]&/@FactorInteger[n]]}, Times@@pi-Total[pi]]; Join[{1}, Array[dps, 100, 2]] (* Harvey P. Dale, May 26 2023 *)
PROG
CROSSREFS
KEYWORD
sign
AUTHOR
Gus Wiseman, Mar 25 2019
EXTENSIONS
Data section extended up to a(93) by Antti Karttunen, May 08 2022
STATUS
approved