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 #15 Dec 30 2022 06:30:49
%S 1,-1,-2,-1,-2,2,-2,0,1,2,-2,2,-2,2,4,1,-2,-1,-2,2,4,2,-2,0,1,2,0,2,
%T -2,-4,-2,1,4,2,4,-1,-2,2,4,0,-2,-4,-2,2,-2,2,-2,-2,1,-1,4,2,-2,0,4,0,
%U 4,2,-2,-4,-2,2,-2,0,4,-4,-2,2,4,-4,-2,0,-2,2,-2,2,4,-4,-2,-2,0,2,-2,-4,4,2,4,0,-2,2,4,2,4,2,4,-2,-2,-1,-2,-1,-2,-4,-2,0,-8
%N Dirichlet inverse of A320111, number of divisors of n that are not of the form 4k+2.
%C Multiplicative because A320111 is.
%H Antti Karttunen, <a href="/A355691/b355691.txt">Table of n, a(n) for n = 1..100000</a>
%F a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A320111(n/d) * a(d).
%F Multiplicative with a(2^e) = A010892(e+2) and for a prime p > 2, a(p) = -2, a(p^2) = 1 and a(p^e) = 0 when e > 2. - _Sebastian Karlsson_, Oct 21 2022
%F Dirichlet g.f.: 4^s/(zeta(s)^2*(1 - 2^s + 4^s)). - _Amiram Eldar_, Dec 30 2022
%t f[2, e_] := Switch[Mod[e, 6], 0, 0, 1, -1, 2, -1, 3, 0, 4, 1, 5, 1]; f[p_, 1] = -2; f[p_, 2] = 1; f[p_, e_] := 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Dec 30 2022 *)
%o (PARI)
%o A320111(n) = sumdiv(n,d,(2!=(d%4)));
%o memoA355691 = Map();
%o A355691(n) = if(1==n,1,my(v); if(mapisdefined(memoA355691,n,&v), v, v = -sumdiv(n,d,if(d<n,A320111(n/d)*A355691(d),0)); mapput(memoA355691,n,v); (v)));
%Y Cf. A320111.
%Y Cf. also A355690.
%Y Cf. A010892.
%K sign,mult
%O 1,3
%A _Antti Karttunen_, Jul 15 2022