login
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).
4
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,4
COMMENTS
First differs from A122810 at n = 48, and from A318322 at n = 64.
LINKS
FORMULA
Additive with a(p^e) = A000720(e) + 1.
a(n) = 1 is and only if n is squarefree (A005117) > 1.
a(n) = A366988(n) + A001221(n).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761), C = Sum_{p prime} P(p) = 0.67167522222173297323..., and P(s) is the prime zeta function.
MATHEMATICA
f[p_, e_] := PrimePi[e] + 1; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, 1 + primepi(f[i, 2])); }
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Oct 31 2023
STATUS
approved