OFFSET
1,3
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.
We use the "rounding half to even" rule, see link.
LINKS
Wikipedia, Rounding.
EXAMPLE
The prime indices of 180 are {1,1,2,2,3}, with mean 9/5, which rounds to 2, so a(180) = 2.
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[If[n==1, 0, Round[Mean[prix[n]]]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 07 2023
STATUS
approved