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”).
%I #12 Nov 23 2023 15:16:55
%S 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,
%T 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,
%U 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
%N Number of evil exponents in the prime factorization of n.
%H Amiram Eldar, <a href="/A367512/b367512.txt">Table of n, a(n) for n = 1..10000</a>
%F Additive with a(p^e) = A010059(e).
%F a(n) = A001221(n) - A293439(n).
%F a(n) = A001221(A367513(n)).
%F a(n) = log_2(A367516(n)).
%F a(n) >= 0, with equality if and only if n is an exponentially odious number (A270428).
%F a(n) <= A001221(n), with equality if and only if n is an exponentially evil number (A262675).
%F 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)).
%t f[p_, e_] := 1 - ThueMorse[e]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
%o (PARI) a(n) = vecsum(apply(e -> !(hammingweight(e)%2), factor(n)[, 2]));
%o (Python)
%o from sympy import factorint
%o def A367512(n): return sum(1 for e in factorint(n).values() if e.bit_count()&1^1) # _Chai Wah Wu_, Nov 23 2023
%Y Cf. A001221, A010059, A262675, A270428, A293439, A367513, A367516.
%K nonn,easy
%O 1
%A _Amiram Eldar_, Nov 21 2023