OFFSET
1,2
COMMENTS
Dirichlet inverse of A002131.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(1) = 1; a(n) = -Sum_{d|n, d<n} A002131(n/d) * a(d).
a(n) = Sum_{d|n, n/d odd} mu(n/d) * mu(d) * d.
Multiplicative with a(2^e) = -2 if e = 1 and 0 otherwise, and a(p^e) = -(p+1) for e = 1, p for e = 2 and 0 if e > 2, for odd primes p. - Amiram Eldar, Nov 30 2020
MATHEMATICA
a[1] = 1; a[n_] := -Sum[Total[Select[Divisors[n/d], OddQ[(n/d)/#] &]] a[d], {d, Most @ Divisors[n]}]; Table[a[n], {n, 1, 70}]
Table[DivisorSum[n, MoebiusMu[n/#] MoebiusMu[#] # &, OddQ[n/#] &], {n, 1, 70}]
f[2, e_] := -2*Boole[e == 1]; f[p_, e_] := Which[e == 1, -(p + 1), e == 2, p, e > 2, 0]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Nov 30 2020 *)
PROG
(PARI) a(n)={sumdiv(n, d, if(n/d%2, moebius(n/d)*moebius(d)*d))} \\ Andrew Howroyd, Oct 25 2019
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Ilya Gutkovskiy, Oct 22 2019
STATUS
approved