login
A359818
Dirichlet inverse of A359549, where A359549 is the characteristic function for numbers that are either an odd squarefree number squared or twice such a number.
3
1, -1, 0, 1, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1
OFFSET
1
COMMENTS
Multiplicative because A359549 is.
LINKS
FORMULA
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A359549(n/d) * a(d).
Multiplicative with a(2^e) = (-1)^e, and for p > 2, a(p^e) = 0 if e is odd, and (-1)^(e/2) if e is even. - Amiram Eldar, Jan 26 2023
MATHEMATICA
f[p_, e_] := If[OddQ[e], 0, (-1)^(e/2)]; f[2, e_] := (-1)^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 26 2023 *)
PROG
(PARI) A359818(n) = { my(f=factor(n)); prod(k=1, #f~, if(2==f[k, 1], (-1)^f[k, 2], if(f[k, 2]%2, 0, (-1)^(f[k, 2]/2)))); }; \\ (After Mathematica program) - Antti Karttunen, Jan 26 2023
CROSSREFS
Cf. A053866 (parity and the absolute values).
Cf. A359549 (Dirichlet inverse).
Cf. also A143259.
Sequence in context: A214509 A053866 A143259 * A207710 A207735 A208546
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Jan 17 2023
STATUS
approved