Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #24 Oct 02 2024 12:36:06
%S 1,0,0,0,0,1,0,1,0,1,0,1,0,1,1,0,0,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,
%T 1,1,0,1,1,0,0,0,0,1,1,1,0,1,0,1,1,1,0,0,1,0,1,1,0,0,0,1,1,1,1,0,0,1,
%U 1,0,0,0,0,1,1,1,1,0,0,1,0,1,0,0,1,1,1,0,0,0,1,1,1,1,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,1,1,0,0,1,1,1,1,1,1
%N a(n) = 1 if the total number of 1-bits in the exponents of prime factorization n is even, otherwise 0.
%H Antti Karttunen, <a href="/A359464/b359464.txt">Table of n, a(n) for n = 1..100000</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.
%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>.
%F a(n) = A059841(A064547(n)).
%F a(n) = 1 - A092248(A367514(n)). - _Amiram Eldar_, Oct 02 2024
%t a[n_] := Boole@ EvenQ[Plus @@ DigitCount[FactorInteger[n][[;; , 2]], 2, 1]]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Oct 02 2024 *)
%o (PARI)
%o A064547(n) = {my(f = factor(n)[, 2]); sum(k=1, #f, hammingweight(f[k])); } \\ From A064547.
%o A359464(n) = !(A064547(n)%2);
%o (Python)
%o from functools import reduce
%o from operator import ixor
%o from sympy import factorint
%o def A359464(n): return reduce(ixor,(d.bit_count() for d in factorint(n).values()),1)&1 # _Chai Wah Wu_, Jan 04 2023
%Y Characteristic function of A000379.
%Y Cf. A059841, A064547, A092248, A359465, A367514.
%K nonn,easy,base
%O 1
%A _Antti Karttunen_, Jan 02 2023