OFFSET
1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Additive with a(p^e) = A010059(e).
a(n) = log_2(A367516(n)).
a(n) >= 0, with equality if and only if n is an exponentially odious number (A270428).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} f(1/p) = 0.12689613844142998028..., where f(x) = x - 1/2 + ((1-x)/2) * Product_{k>=0} (1-x^(2^k)).
MATHEMATICA
f[p_, e_] := 1 - ThueMorse[e]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = vecsum(apply(e -> !(hammingweight(e)%2), factor(n)[, 2]));
(Python)
from sympy import factorint
def A367512(n): return sum(1 for e in factorint(n).values() if e.bit_count()&1^1) # Chai Wah Wu, Nov 23 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Nov 21 2023
STATUS
approved