%I #32 Jan 03 2024 14:57:04
%S 1,-1,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,
%T 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
%U 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1
%N Dirichlet inverse of A053866, where A053866(n) gives the parity of sigma(n).
%H Antti Karttunen, <a href="/A359548/b359548.txt">Table of n, a(n) for n = 1..100000</a>
%H Jon Maiga, <a href="http://sequencedb.net/s/A359548">Computer-generated formulas for A359548</a>, Sequence Machine.
%F Multiplicative with a(2^e) = -1 if e=1, a(2^e) = 0 if e > 1, and for odd primes p, a(p^e) = -1 if e=2, a(p^e) = 0 if e=1 or e>2.
%F a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A053866(n/d) * a(d).
%F a(2^n) = A008683(2^n); a(2n+1) = A271102(2n+1).
%F From _Antti Karttunen_, Nov 24 2023: (Start)
%F a(n) = Sum_{d|n} A008683(n/d)*A323239(d).
%F a(n) = A359549(n) * A359818(n). [From Sequence Machine] (End)
%t f[p_, e_] := If[(p == 2 && e == 1) || (p > 2 && e == 2), -1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Jan 07 2023 *)
%o (PARI) A359548(n) = { my(f=factor(n)); prod(k=1, #f~, if(2==f[k,1],-(1==f[k,2]),-(2==f[k,2]))); };
%o (Python)
%o from math import prod
%o from sympy import factorint
%o def A359548(n): return (0 if (m:=(~n & n-1).bit_length())>1 else (-1 if m==1 else 1))*prod(-1 if e==2 else 0 for e in factorint(n>>m).values()) # _Chai Wah Wu_, Jan 03 2024
%Y Cf. A008683, A053866, A271102, A359549 (parity of terms, and also their absolute values), A359818.
%Y Möbius transform of A323239.
%K sign,mult
%O 1
%A _Antti Karttunen_, Jan 06 2023