login
A355524
Minimal difference between adjacent prime indices of n > 1, or 0 if n is prime.
13
0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 3, 6, 1, 0, 0, 7, 4, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 6, 9, 0, 0, 0, 10, 0, 0, 3, 1, 0, 0, 7, 1, 0, 0, 0, 11, 0, 0, 1, 1, 0, 0, 0, 12, 0, 0, 4, 13, 8
OFFSET
2,9
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], 0, Min@@Differences[primeMS[n]]], {n, 2, 100}]
CROSSREFS
Crossrefs found in the link are not repeated here.
Positions of first appearances are A077017 w/o the first term.
Positions of terms > 0 are A120944.
Positions of zeros are A130091.
Triangle A238353 counts m such that A056239(m) = n and a(m) = k.
For maximal difference we have A286470 or A355526.
Positions of terms > 1 are A325161.
If singletons (k) have minimal difference k we get A355525.
Positions of 1's are A355527.
Prepending 0 to the prime indices gives A355528.
A115720 and A115994 count partitions by their Durfee square.
A287352, A355533, A355534, A355536 list the differences of prime indices.
Sequence in context: A257685 A347233 A327172 * A113503 A082507 A132349
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 10 2022
STATUS
approved