|
|
A367169
|
|
a(n) is the sum of the exponents in the prime factorization of n that are powers of 2.
|
|
5
|
|
|
0, 1, 1, 2, 1, 2, 1, 0, 2, 2, 1, 3, 1, 2, 2, 4, 1, 3, 1, 3, 2, 2, 1, 1, 2, 2, 0, 3, 1, 3, 1, 0, 2, 2, 2, 4, 1, 2, 2, 1, 1, 3, 1, 3, 3, 2, 1, 5, 2, 3, 2, 3, 1, 1, 2, 1, 2, 2, 1, 4, 1, 2, 3, 0, 2, 3, 1, 3, 2, 3, 1, 2, 1, 2, 3, 3, 2, 3, 1, 5, 4, 2, 1, 4, 2, 2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
LINKS
|
|
|
FORMULA
|
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = -P(2) + Sum_{k>=1} 2^k * (P(2^k) - P(2^k+1)) = 0.28425245481079272416..., where P(s) is the prime zeta function.
|
|
MATHEMATICA
|
f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
|
|
PROG
|
(PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, if(f[i, 2] == 1 << valuation(f[i, 2], 2), f[i, 2], 0)); }
(Python)
from sympy import factorint
def A367169(n): return sum(e for e in factorint(n).values() if not(e&-e)^e) # Chai Wah Wu, Nov 10 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|