login
A359592
Parity (and also absolute values) of Dirichlet inverse of A035263, where A035263(n) is parity of 2-adic valuation of 2n.
5
1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0
OFFSET
1
FORMULA
Multiplicative with a(2^e) = 1 if e = 2, 0 otherwise, and for odd primes p, a(p^e) = 1 if e = 1, 0 otherwise.
a(n) = abs(A359591(n)) = A359591(n) mod 2.
a(n) = A092673(n) mod 2 = A359588(n) mod 2.
From Amiram Eldar, Jan 11 2023: (Start)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5/Pi^2 = 0.506605... .
Dirichlet g.f.: (zeta(s)/zeta(2*s))*(4^s+1)/(4^s+2^s). (End)
MATHEMATICA
f[p_, e_] := If[e == 1, 1, 0]; f[2, e_] := If[e == 2, 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 11 2023 *)
PROG
(PARI) A359592(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], (2==f[k, 2]), (1==f[k, 2]))); };
(Python)
from sympy import mobius
def A359592(n): return (mobius(n)&1)^(0 if n&1 else mobius(n>>1)&1) # Chai Wah Wu, Jan 09 2023
CROSSREFS
Characteristic function of A091428.
Also parity of A092673 and of A359588.
Sequence in context: A322980 A267053 A359591 * A257477 A259024 A323045
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Jan 09 2023
STATUS
approved