%I #20 Jan 11 2023 05:12:15
%S 1,0,1,1,1,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,0,0,0,1,1,0,1,0,1,0,
%T 1,0,1,0,1,0,1,0,1,1,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,1,0,0,0,1,0,1,1,
%U 1,0,1,0,1,0,0,1,1,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,0,1,0
%N Parity (and also absolute values) of Dirichlet inverse of A035263, where A035263(n) is parity of 2-adic valuation of 2n.
%H Antti Karttunen, <a href="/A359592/b359592.txt">Table of n, a(n) for n = 1..100000</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.
%F Multiplicative with a(2^e) = 1 if e = 2, 0 otherwise, and for odd primes p, a(p^e) = 1 if e = 1, 0 otherwise.
%F a(n) = abs(A359591(n)) = A359591(n) mod 2.
%F a(n) = A092673(n) mod 2 = A359588(n) mod 2.
%F From _Amiram Eldar_, Jan 11 2023: (Start)
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5/Pi^2 = 0.506605... .
%F Dirichlet g.f.: (zeta(s)/zeta(2*s))*(4^s+1)/(4^s+2^s). (End)
%t f[p_, e_] := If[e == 1, 1, 0]; f[2, e_] := If[e == 2, 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Jan 11 2023 *)
%o (PARI) A359592(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1],(2==f[k, 2]),(1==f[k, 2]))); };
%o (Python)
%o from sympy import mobius
%o def A359592(n): return (mobius(n)&1)^(0 if n&1 else mobius(n>>1)&1) # _Chai Wah Wu_, Jan 09 2023
%Y Characteristic function of A091428.
%Y Cf. A001511, A035263, A359591.
%Y Also parity of A092673 and of A359588.
%K nonn,mult
%O 1
%A _Antti Karttunen_, Jan 09 2023