A355523 Number of distinct differences between adjacent prime indices of n.
0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 2, 1, 1, 0, 2, 1, 1, 1, 2, 0, 1, 0, 1, 1, 1, 1, 2, 0, 1, 1, 2, 0, 2, 0, 2, 2, 1, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 1, 1, 0, 2, 0, 1, 2, 1, 1, 2, 0, 2, 1, 2, 0, 2, 0, 1, 2, 2, 1, 2, 0, 2, 1, 1, 0, 3, 1, 1, 1, 2, 0, 2, 1, 2, 1, 1, 1, 2, 0, 2, 2, 2, 0, 2, 0, 2, 1
Offset: 1
Keywords
Examples
For example, the prime indices of 22770 are {1,2,2,3,5,9}, with differences (1,0,1,2,4), so a(22770) = 4.
Links
Crossrefs
Programs
-
Mathematica
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; Table[Length[Union[Differences[primeMS[n]]]],{n,1000}]
-
PARI
A355523(n) = if(1==n, 0, my(pis = apply(primepi,factor(n)[,1]), difs = vector(#pis-1, i, pis[i+1]-pis[i])); (#Set(difs)+!issquarefree(n))); \\ Antti Karttunen, Jan 20 2025
Extensions
Data section extended to a(105) by Antti Karttunen, Jan 20 2025
Comments