A360614 Numerator of the average distance between consecutive 0-prepended prime indices of n; a(1) = 0.
0, 1, 2, 1, 3, 1, 4, 1, 1, 3, 5, 2, 6, 2, 3, 1, 7, 2, 8, 1, 2, 5, 9, 1, 3, 3, 2, 4, 10, 1, 11, 1, 5, 7, 2, 1, 12, 4, 3, 3, 13, 4, 14, 5, 1, 9, 15, 2, 2, 1, 7, 2, 16, 1, 5, 1, 4, 5, 17, 3, 18, 11, 4, 1, 3, 5, 19, 7, 9, 4, 20, 2, 21, 6, 1, 8, 5, 2, 22, 3, 1, 13, 23, 1, 7, 7, 5, 5, 24, 3, 3, 3, 11, 15, 4, 1, 25, 4, 5, 3
Offset: 1
Examples
The 0-prepended prime indices of 100 are {0,1,1,3,3}, with differences (1,0,2,0), with mean 3/4, so a(100) = 3.
Links
Programs
-
Mathematica
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; Table[If[n==1,0,Numerator[Mean[Differences[Prepend[prix[n],0]]]]],{n,100}]
-
PARI
A360614(n) = if(1==n,0, my(u=primepi(vecmax(factor(n)[, 1]))); (u/gcd(u, bigomega(n)))); \\ Antti Karttunen, Oct 23 2023
Formula
Extensions
Data section extended up to a(100) by Antti Karttunen, Oct 23 2023
Comments