OFFSET
1,49
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
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
The prime indices of 39 are {2,6}, so a(39) = 0.
The prime indices of 70 are {1,3,4}, so a(70) = 1.
The prime indices of 98 are {1,4,4}, so a(98) = 2.
The prime indices of 294 are {1,2,4,4}, a(294) = 2.
The prime indices of 1911 are {2,4,4,6}, so a(1911) = 2.
The prime indices of 2548 are {1,1,4,4,6}, so a(2548) = 2.
MATHEMATICA
prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Length[Select[prix[n], Not@*SquareFreeQ]], {n, 100}]
PROG
(PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, f[i, 2] * (1 - issquarefree(primepi(f[i, 1])))); } \\ Amiram Eldar, Jan 17 2026
CROSSREFS
Positions of first appearances are A000420.
A008966 is the characteristic function for the squarefree numbers.
A377038 gives k-th differences of squarefree numbers.
Other counts of prime indices:
KEYWORD
nonn,easy
AUTHOR
Gus Wiseman, Dec 27 2024
STATUS
approved
