OFFSET
1,4
COMMENTS
Sum of the cototient and the Moebius function. If n is prime, then a(n) = 0. Proof: p - phi(p) + mu(p) = p - (p-1) + (-1) = 0. If n is semiprime, then a(n) is equal to the sum of the distinct prime factors of n.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2000
FORMULA
EXAMPLE
a(4) = 2, Since 4 - phi(4) + mu(4) = 4 - 2 + 0 = 2.
a(6) = 5, since 6 - phi(6) + mu(6) = 6 - 2 + 1 = 5. Note that the sum of the distinct prime factors of 4 is 2 and the sum of the distinct prime factors of 6 is 5.
MAPLE
with(numtheory); seq(k - phi(k) + mobius(k), k=1..70);
MATHEMATICA
Table[n - EulerPhi[n] + MoebiusMu[n], {n, 100}]
PROG
(PARI) a(n) = n - eulerphi(n) + moebius(n); \\ Michel Marcus, Dec 06 2016
(Magma) [n-EulerPhi(n)+MoebiusMu(n): n in [1..80]]; // Vincenzo Librandi, Jul 30 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Aug 27 2013
STATUS
approved