OFFSET
1,2
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..10000 (First 1000 terms from T. D. Noe.)
FORMULA
a(n) > 1 for n > 1; a(n) = 2 if and only if n is prime. - Charles R Greathouse IV, May 09 2013
G.f.: Sum_{k>=1} (1 - mu(k))*x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Sep 29 2017
EXAMPLE
a(4) = sigma(4) - phi(4) = 7-2 = 5.
MATHEMATICA
a[n_] := SeriesCoefficient[Sum[(1-MoebiusMu[k])*x^k/(1-x^k)^2, {k, 1, n}], {x, 0, n}]; Array[a, 74] (* Jean-François Alcover, Sep 29 2017, after Ilya Gutkovskiy *)
PROG
(PARI) a(n)=sigma(n)-eulerphi(n) \\ Charles R Greathouse IV, May 09 2013
(Haskell)
a051612 n = a000203 n - a000010 n -- Reinhard Zumkeller, Aug 05 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved