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 #16 Jan 12 2023 18:43:51
%S 1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,
%T 1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,
%U 1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,1
%N Parity of A358777, where A358777 is Dirichlet inverse of the characteristic function of odd numbers with an even number of prime factors (counted with multiplicity).
%H Antti Karttunen, <a href="/A359595/b359595.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 a(n) = A358777(n) mod 2 = A359589(n) mod 2.
%F A353480(n) <= a(n) <= A353557(n). [See comments in A358777]
%o (PARI)
%o A353557(n) = ((n%2)&&(!(bigomega(n)%2)));
%o memoA358777 = Map();
%o A358777(n) = if(1==n,1,my(v); if(mapisdefined(memoA358777,n,&v), v, v = -sumdiv(n,d,if(d<n,A353557(n/d)*A358777(d),0)); mapput(memoA358777,n,v); (v)));
%o A359595(n) = (A358777(n)%2);
%Y Characteristic function of A359596.
%Y Parity of A358777 and of A359589.
%Y Cf. A353557.
%Y Differs from A353480 at the positions given by A359597: after 1 for the next time at n=135, where a(135) = 1.
%K nonn
%O 1
%A _Antti Karttunen_, Jan 09 2023