A123391 a(n) = sum of exponents that are primes in the prime factorization of n.
0, 0, 0, 2, 0, 0, 0, 3, 2, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 3, 2, 0, 3, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0, 2, 2, 0, 0, 0, 2, 2, 0, 2, 0, 3, 0, 3, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 2, 0, 2, 0, 0, 0, 5, 0, 2, 2, 4, 0, 0, 0, 3, 0
Offset: 1
Examples
36 = 2^2*3^2. Both exponents in this prime factorization are primes. So a(36) = 2+2 = 4.
Links
Programs
-
Mathematica
f[n_] := Plus @@ Select[Last /@ FactorInteger[n], PrimeQ];Table[f[n], {n, 120}] (* Ray Chandler, Nov 11 2006*)
-
PARI
{m=105; for(n=1, m, v=factor(n)[,2]; s=0; for(j=1, #v, if(isprime(v[j]), s=s+v[j])); print1(s,","))} \\ Klaus Brockhaus, Nov 14 2006
-
PARI
A123391(n) = vecsum(apply(e -> isprime(e)*e, factorint(n)[, 2])); \\ Antti Karttunen, Jul 19 2017
Formula
Additive with a(p^e) = A010051(e)*e. - Antti Karttunen, Jul 19 2017
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} p*(P(p)-P(p+1)) = 0.97487020987790163735..., where P(s) is the prime zeta function. - Amiram Eldar, Sep 29 2023
Extensions
Extended by Ray Chandler and Klaus Brockhaus, Nov 11 2006