A366989 The number of prime powers p^q dividing n, where p is prime and q is either 1 or prime (A334393 without the first term 1).
0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 3, 3, 1, 3, 1, 4, 2, 2, 2, 4, 1, 2, 2, 4, 1, 3, 1, 3, 3, 2, 1, 4, 2, 3, 2, 3, 1, 4, 2, 4, 2, 2, 1, 4, 1, 2, 3, 4, 2, 3, 1, 3, 2, 3, 1, 5, 1, 2, 3, 3, 2, 3, 1, 4, 3, 2, 1, 4, 2, 2, 2
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
f[p_, e_] := PrimePi[e] + 1; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = {my(f = factor(n)); sum(i = 1, #f~, 1 + primepi(f[i, 2]));}
Comments