login
A319993
a(n) = A319997(n) / A173557(n).
2
1, -1, 1, 0, 1, -1, 1, 0, 3, -1, 1, 0, 1, -1, 1, 0, 1, -3, 1, 0, 1, -1, 1, 0, 5, -1, 9, 0, 1, -1, 1, 0, 1, -1, 1, 0, 1, -1, 1, 0, 1, -1, 1, 0, 3, -1, 1, 0, 7, -5, 1, 0, 1, -9, 1, 0, 1, -1, 1, 0, 1, -1, 3, 0, 1, -1, 1, 0, 1, -1, 1, 0, 1, -1, 5, 0, 1, -1, 1, 0, 27, -1, 1, 0, 1, -1, 1, 0, 1, -3, 1, 0, 1, -1, 1, 0, 1, -7, 3, 0, 1, -1, 1, 0, 1
OFFSET
1,9
LINKS
FORMULA
Multiplicative with a(2^1) = -1, a(2^e) = 0 for e > 1, and a(p^e) = p^(e-1) when p is an odd prime.
a(n) = A319997(n) / A173557(n).
a(2n) = A003557(2n) - 2*A003557(n), a(2n+1) = A003557(2n+1).
PROG
(PARI) A319993(n) = { my(f=factor(n)); prod(i=1, #f~, if(2==f[i, 1], -(1==f[i, 2]), (f[i, 1]^(f[i, 2]-1)))); };
(PARI)
A173557(n) = factorback(apply(p -> p-1, factor(n)[, 1]));
A319997(n) = sumdiv(n, d, (d%2)*moebius(n/d)*d);
A319993(n) = (A319997(n)/A173557(n));
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Nov 08 2018
STATUS
approved