A228620 a(n) = n - phi(n) + mu(n).
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
Examples
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.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..2000
Programs
-
Magma
[n-EulerPhi(n)+MoebiusMu(n): n in [1..80]]; // Vincenzo Librandi, Jul 30 2017
-
Maple
with(numtheory); seq(k - phi(k) + mobius(k), k=1..70);
-
Mathematica
Table[n - EulerPhi[n] + MoebiusMu[n], {n, 100}]
-
PARI
a(n) = n - eulerphi(n) + moebius(n); \\ Michel Marcus, Dec 06 2016
Comments