login
A228620
a(n) = n - phi(n) + mu(n).
1
1, 0, 0, 2, 0, 5, 0, 4, 3, 7, 0, 8, 0, 9, 8, 8, 0, 12, 0, 12, 10, 13, 0, 16, 5, 15, 9, 16, 0, 21, 0, 16, 14, 19, 12, 24, 0, 21, 16, 24, 0, 29, 0, 24, 21, 25, 0, 32, 7, 30, 20, 28, 0, 36, 16, 32, 22, 31, 0, 44, 0, 33, 27, 32, 18, 45, 0, 36, 26, 45, 0, 48, 0
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
FORMULA
a(n) = n - A000010(n) + A008683(n) = A051953(n) + A008683(n) = A076369(n) - A000010(n) = A062830(n) + A008683(n) - 1. a(A001358(n)) = sopf(A001358(n)).
Dirichlet g.f.: (zeta(s-1)*(zeta(s) - 1) + 1)/zeta(s). - Ilya Gutkovskiy, Dec 06 2016
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