OFFSET
1,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
a(1) = 1; a(n) = -Sum_{d|n, d<n} A048272(n/d) * a(d).
a(n) = Sum_{d|n} mu(n/d) * A067856(d).
a(n) = 0 if n == 2 (mod 4). - Bernard Schott, Dec 07 2021
Multiplicative with a(2) = 0, a(2^e) = 2^(e-2) for e >= 2, and for an odd prime p, a(p) = -2, a(p^2) = 1, and a(p^e) = 0 for e >= 3. - Amiram Eldar, Sep 15 2023
MATHEMATICA
a[1] = 1; a[n_] := Sum[Sum[(-1)^j, {j, Divisors[n/d]}] a[d], {d, Most @ Divisors[n]}]; Table[a[n], {n, 1, 80}]
f[p_, e_] := Switch[e, 1, -2, 2, 1, _, 0]; f[2, e_] := 2^(e-2); f[2, 1] = 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 15 2023 *)
PROG
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Ilya Gutkovskiy, Oct 22 2019
STATUS
approved