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”).

A353237
a(n) = Sum_{d|n} (-1)^(d'), where d' is the arithmetic derivative of d (A003415).
3
1, 0, 0, 1, 0, -2, 0, 2, 1, -2, 0, 0, 0, -2, 0, 3, 0, -2, 0, 0, 0, -2, 0, 2, 1, -2, 0, 0, 0, -4, 0, 4, 0, -2, 0, 1, 0, -2, 0, 2, 0, -4, 0, 0, 0, -2, 0, 4, 1, -2, 0, 0, 0, -4, 0, 2, 0, -2, 0, 0, 0, -2, 0, 5, 0, -4, 0, 0, 0, -4, 0, 4, 0, -2, 0, 0, 0, -4, 0, 4, 1, -2, 0, 0, 0, -2
OFFSET
1,6
COMMENTS
From Robert Israel, Jul 23 2023: (Start)
a(n) = 0 if n is odd and squarefree.
a(n) = 1 if n is a square and not divisible by 16.
a(n) < 0 if n > 2 and n == 2 (mod 4).
a(n) = -2 if n = 2*p where p is an odd prime or the square of an odd prime.
(End)
LINKS
FORMULA
a(n) = 2*A353236(n) - A000005(n).
a(n) = A000005(n) - 2*A353235(n).
EXAMPLE
a(6) = Sum_{d|6} (-1)^(d') = (-1)^(1') + (-1)^(2') + (-1)^(3') + (-1)^(6') = (-1)^0 + (-1)^1 + (-1)^1 + (-1)^5 = -2.
MAPLE
ader:= proc(n) option remember;
local t;
n*add(t[2]/t[1], t=ifactors(n)[2])
end proc:
f:= proc(n) local d; add ((-1)^ader(d), d = numtheory:-divisors(n)) end proc:
map(f, [$1..100]); # Robert Israel, Jul 23 2023
MATHEMATICA
d[1] = 0; d[n_] := n*Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); a[n_] := DivisorSum[n, (-1)^d[#] &]; Array[a, 100] (* Amiram Eldar, May 02 2022 *)
PROG
(PARI) ad(n) = vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]); \\ A003415
a(n) = sumdiv(n, d, (-1)^ad(d)); \\ Michel Marcus, May 02 2022
CROSSREFS
Cf. A000005 (tau), A003415 (n'), A353235, A353236.
Sequence in context: A166348 A294658 A127543 * A280830 A068907 A219762
KEYWORD
sign
AUTHOR
Wesley Ivan Hurt, May 01 2022
STATUS
approved