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 #11 Jan 26 2023 12:17:25
%S 1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,1,0,1,1,1,1,1,1,1,
%T 1,0,1,1,1,0,1,1,1,1,0,1,1,1,0,0,1,1,1,0,1,0,1,1,1,1,1,1,0,0,1,1,1,1,
%U 1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,0,0,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,0
%N Parity of Dirichlet inverse of A359832, where A359832(n) = 1 if the 2-adic valuation of n is either 0 or odd, otherwise 0.
%H Antti Karttunen, <a href="/A359834/b359834.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 is not a multiple of 3, otherwise 0, and for odd primes p, a(p^e) = 1 if e = 1, otherwise 0.
%F a(n) = A359833(n) mod 2.
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 52/(7*Pi^2) = 0.752671... . - _Amiram Eldar_, Jan 25 2023
%t f[p_, e_] := If[e == 1, 1, 0]; f[2, e_] := If[Divisible[e, 3], 0, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Jan 25 2023 *)
%o (PARI) A359834(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], !!(f[k, 2]%3), (1==f[k, 2]))); };
%Y Cf. A359831, A359832.
%Y Cf. also A359590.
%K nonn,mult
%O 1
%A _Antti Karttunen_, Jan 25 2023