login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A347992
a(n) = Sum_{d|n} (-1)^(tau(d) - 1).
4
1, 0, 0, 1, 0, -2, 0, 0, 1, -2, 0, -2, 0, -2, -2, 1, 0, -2, 0, -2, -2, -2, 0, -4, 1, -2, 0, -2, 0, -6, 0, 0, -2, -2, -2, -1, 0, -2, -2, -4, 0, -6, 0, -2, -2, -2, 0, -4, 1, -2, -2, -2, 0, -4, -2, -4, -2, -2, 0, -8, 0, -2, -2, 1, -2, -6, 0, -2, -2, -6, 0, -4, 0, -2, -2, -2, -2, -6, 0, -4, 1, -2, 0, -8, -2, -2, -2
OFFSET
1,6
LINKS
FORMULA
If p is prime, a(p) = 0.
If p is prime, a(p^even) = 1 and a(p^odd) = 0. - Michel Marcus, Oct 13 2021
If p <> q primes, a(p*q) = -2 (A006881). - Bernard Schott, Oct 13 2021
G.f.: Sum_{k>=1} (-1)^(tau(k) - 1) * x^k/(1 - x^k). - Seiichi Manyama, Oct 14 2021
MATHEMATICA
a[n_] := DivisorSum[n, (-1)^(DivisorSigma[0, #] - 1) &]; Array[a, 100] (* Amiram Eldar, Oct 08 2021 *)
PROG
(PARI) a(n) = sumdiv(n, d, (-1)^(numdiv(d)-1));
(PARI) my(N=99, x='x+O('x^N)); Vec(sum(k=1, N, (-1)^(numdiv(k)-1)*x^k/(1-x^k)))
CROSSREFS
KEYWORD
sign
AUTHOR
Seiichi Manyama, Oct 08 2021
STATUS
approved