OFFSET
1
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
FORMULA
Multiplicative with a(p^e) = (-1)^e for odd primes p, and a(2^e) = -1 if e = 1, otherwise 0.
For all e >= 0, a(2^e) = A008683(2^e).
For all n >= 0, a(2n+1) = A008836(2n+1).
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A353627(n/d) * a(d).
Dirichlet g.f.: (1-1/4^s)*zeta(2*s)/zeta(s). - Amiram Eldar, Jan 01 2023
MATHEMATICA
f[p_, e_] := (-1)^e; f[2, e_] := If[e == 1, -1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 28 2022 *)
PROG
(PARI) A358839(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], -(1==f[k, 2]), (-1)^f[k, 2])); };
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Dec 23 2022
STATUS
approved