OFFSET
1,4
COMMENTS
a(n) = 0 if and only if n is prime. If n is semiprime, then a(n) = sopfr(n).
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
Antti Karttunen, Sequence plotted up to n=10000, showing the details better
MAPLE
with(numtheory): a:=n->(sigma(n)-n-1)*(2-mobius(n)): seq(a(n), n=1..100);
MATHEMATICA
Table[(DivisorSigma[1, n] - n - 1) (2 - MoebiusMu[n]), {n, 100}]
PROG
(Magma) [(SumOfDivisors(n)-n-1)*(2-MoebiusMu(n)): n in [1..80]]; // Vincenzo Librandi, May 05 2015
(Perl) use ntheory ":all"; say +(divisor_sum($_)-$_-1)*(2-moebius($_)) for 1..80; # Dana Jacobsen, May 13 2015
(PARI) a(n)=(sigma(n)-n-1)*(2-moebius(n)) \\ Dana Jacobsen, May 13 2015
CROSSREFS
KEYWORD
sign
AUTHOR
Wesley Ivan Hurt, May 04 2015
EXTENSIONS
Formula corrected for case n=1 by Antti Karttunen, Feb 25 2018
STATUS
approved