login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A355525
Minimal difference between adjacent prime indices of n, or k if n is the k-th prime.
11
1, 2, 0, 3, 1, 4, 0, 0, 2, 5, 0, 6, 3, 1, 0, 7, 0, 8, 0, 2, 4, 9, 0, 0, 5, 0, 0, 10, 1, 11, 0, 3, 6, 1, 0, 12, 7, 4, 0, 13, 1, 14, 0, 0, 8, 15, 0, 0, 0, 5, 0, 16, 0, 2, 0, 6, 9, 17, 0, 18, 10, 0, 0, 3, 1, 19, 0, 7, 1, 20, 0, 21, 11, 0, 0, 1, 1, 22, 0, 0, 12
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.
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.
Positions of 0's are A013929, see also A130091.
Triangle A238709 counts m such that A056239(m) = n and a(m) = k.
For maximal instead of minimal difference we have A286470.
Positions of terms > 1 are A325160, also A325161.
See also A355524, A355528.
Positions of 1's are A355527.
A001522 counts partitions with a fixed point (unproved), ranked by A352827.
A238352 counts partitions by fixed points, rank statistic A352822.
A287352, A355533, A355534, A355536 list the differences of prime indices.
Sequence in context: A355533 A355528 A277697 * A241917 A355526 A243056
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 10 2022
STATUS
approved