A324852 Number of distinct prime indices of n that divide n.
0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 2, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 0, 1, 0, 2, 1, 2, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 3, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 1
Offset: 1
Keywords
Examples
60060 has 7 prime indices {1,1,2,3,4,5,6}, all of which divide 60060, and 6 of which are distinct, so a(60060) = 6.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..65536
Crossrefs
Programs
-
Maple
a:= n-> add(`if`(irem(n, numtheory[pi](i[1]))=0, 1, 0), i=ifactors(n)[2]): seq(a(n), n=1..120); # Alois P. Heinz, Mar 19 2019
-
Mathematica
Table[Count[If[n==1,{},FactorInteger[n]],{p_,_}/;Divisible[n,PrimePi[p]]],{n,100}]
-
PARI
a(n) = {my(f = factor(n)[,1]); sum(k=1, #f, !(n % primepi(f[k])));} \\ Michel Marcus, Mar 19 2019
Formula
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/(k*prime(k)) = 0.848969... (A124012). - Amiram Eldar, Jan 11 2025
Comments