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.

A051612 a(n) = sigma(n) - phi(n).

This page as a plain text file.
%I A051612 #31 Dec 05 2023 00:23:05
%S A051612 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,
%T A051612 44,2,64,2,47,28,38,24,79,2,42,32,74,2,84,2,64,54,50,2,108,15,73,40,
%U A051612 74,2,102,32,96,44,62,2,152,2,66,68,95,36,124,2,94,52,120,2,171,2,78
%N A051612 a(n) = sigma(n) - phi(n).
%H A051612 N. J. A. Sloane, <a href="/A051612/b051612.txt">Table of n, a(n) for n = 1..10000</a> (First 1000 terms from T. D. Noe.)
%F A051612 a(n) = A000203(n)-A000010(n).
%F A051612 a(n) > 1 for n > 1; a(n) = 2 if and only if n is prime. - _Charles R Greathouse IV_, May 09 2013
%F A051612 G.f.: Sum_{k>=1} (1 - mu(k))*x^k/(1 - x^k)^2. - _Ilya Gutkovskiy_, Sep 29 2017
%e A051612 a(4) = sigma(4) - phi(4) = 7-2 = 5.
%t A051612 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_ *)
%o A051612 (PARI) a(n)=sigma(n)-eulerphi(n) \\ _Charles R Greathouse IV_, May 09 2013
%o A051612 (Haskell)
%o A051612 a051612 n = a000203 n - a000010 n -- _Reinhard Zumkeller_, Aug 05 2014
%Y A051612 Cf. A000010, A000203, A110085, A110086, A110087.
%Y A051612 Cf. A240960, A292769 (partial sums).
%K A051612 nonn
%O A051612 1,2
%A A051612 _Jud McCranie_