A360615 Denominator of the average distance between consecutive 0-prepended prime indices of n; a(1) = 0.
0, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 3, 1, 1, 2, 4, 1, 3, 1, 1, 1, 2, 1, 2, 2, 1, 3, 3, 1, 1, 1, 5, 2, 2, 1, 2, 1, 1, 1, 4, 1, 3, 1, 3, 1, 2, 1, 5, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 4, 1, 2, 3, 6, 1, 3, 1, 3, 2, 3, 1, 5, 1, 1, 1, 3, 2, 1, 1, 5, 2, 2, 1, 1, 2, 1, 1, 4
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) = 4.
Links
- Winston de Greef, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; Table[If[n==1,0,Denominator[Mean[Differences[Prepend[prix[n],0]]]]],{n,100}]
-
PARI
a(n) = if (n==1, 0, my(f=factor(n)); denominator(primepi(vecmax(f[, 1]))/ bigomega(f))); \\ Michel Marcus, Feb 20 2023
Comments