Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #16 Jan 24 2023 16:44:38
%S 1,-1,-1,0,-1,1,0,0,1,1,0,0,0,0,1,0,-1,-1,0,0,0,0,0,0,1,0,-1,0,0,-1,0,
%T 0,0,1,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,-1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,
%U 0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,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 A336477, where A336477(n) = 1 if phi(n) is a power of 2, otherwise 0.
%H Antti Karttunen, <a href="/A359578/b359578.txt">Table of n, a(n) for n = 1..101250</a>
%F a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A336477(n/d) * a(d).
%F Multiplicative with a(2^e) = -1 if e = 1, and 0 if e > 1, and for primes p > 2, a(p^e) = (-A209229(p-1))^e. - Corrected by _Amiram Eldar_ and _Antti Karttunen_, Jan 24 2023
%t f[p_, e_] := If[2^IntegerExponent[p - 1, 2] == p - 1, (-1)^e, 0]; f[2, e_] := If[e == 1, -1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Jan 24 2023 *)
%o (PARI)
%o A209229(n) = (n && !bitand(n,n-1));
%o A359578(n) = { my(f=factor(n)); prod(k=1,#f~,if(2==f[k,1], -(1==f[k,2]), (-A209229(f[k,1]-1))^f[k,2])); };
%Y Cf. A209229, A336477.
%Y Cf. also A359579.
%K sign,mult
%O 1
%A _Antti Karttunen_, Jan 08 2023