login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A367512
Number of evil exponents in the prime factorization of n.
6
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
OFFSET
1
LINKS
FORMULA
Additive with a(p^e) = A010059(e).
a(n) = A001221(n) - A293439(n).
a(n) = A001221(A367513(n)).
a(n) = log_2(A367516(n)).
a(n) >= 0, with equality if and only if n is an exponentially odious number (A270428).
a(n) <= A001221(n), with equality if and only if n is an exponentially evil number (A262675).
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
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Nov 21 2023
STATUS
approved