login
A051612
a(n) = sigma(n) - phi(n).
35
0, 2, 2, 5, 2, 10, 2, 11, 7, 14, 2, 24, 2, 18, 16, 23, 2, 33, 2, 34, 20, 26, 2, 52, 11, 30, 22, 44, 2, 64, 2, 47, 28, 38, 24, 79, 2, 42, 32, 74, 2, 84, 2, 64, 54, 50, 2, 108, 15, 73, 40, 74, 2, 102, 32, 96, 44, 62, 2, 152, 2, 66, 68, 95, 36, 124, 2, 94, 52, 120, 2, 171, 2, 78
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) = A000203(n)-A000010(n).
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
Cf. A240960, A292769 (partial sums).
Sequence in context: A347466 A266662 A289078 * A083456 A211932 A213642
KEYWORD
nonn
AUTHOR
STATUS
approved