OFFSET
2,2
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
EXAMPLE
The prime indices of 9842 are {1,4,8,12}, with differences (3,4,4), so a(9842) = 3.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[If[PrimeQ[n], PrimePi[n], Min@@Differences[primeMS[n]]], {n, 2, 100}]
CROSSREFS
Crossrefs found in the link are not repeated here.
Positions of first appearances are 4 followed by A000040.
For maximal instead of minimal difference we have A286470.
Positions of 1's are A355527.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 10 2022
STATUS
approved