A051612 a(n) = sigma(n) - phi(n).
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
Keywords
Examples
a(4) = sigma(4) - phi(4) = 7-2 = 5.
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..10000 (First 1000 terms from T. D. Noe.)
Programs
-
Haskell
a051612 n = a000203 n - a000010 n -- Reinhard Zumkeller, Aug 05 2014
-
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 *)
-
PARI
a(n)=sigma(n)-eulerphi(n) \\ Charles R Greathouse IV, May 09 2013
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