cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A228620 a(n) = n - phi(n) + mu(n).

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Aug 27 2013

Keywords

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.

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.
		

Crossrefs

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
    

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