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.
%I A297159 #19 Dec 04 2023 01:39:06 %S A297159 0,1,1,1,1,2,1,1,2,4,1,0,1,6,5,1,1,3,1,2,7,10,1,-4,4,12,5,4,1,2,1,1, %T A297159 11,16,9,-7,1,18,13,-2,1,6,1,8,9,22,1,-12,6,17,17,10,1,6,13,0,19,28,1, %U A297159 -20,1,30,13,1,15,14,1,14,23,18,1,-27,1,36,21,16,15,18,1,-10,14,40,1,-20,19,42,29,4,1,-12,17,20,31,46,21,-28,1,39,21,3,1,26 %N A297159 a(n) = 3*n - 2*phi(n) - sigma(n); Difference between the deficiency of n and its Moebius-transform. %H A297159 Antti Karttunen, <a href="/A297159/b297159.txt">Table of n, a(n) for n = 1..65537</a> %F A297159 a(n) = A033879(n) - A083254(n) = 3*n - 2*A000010(n) - A000203(n). %F A297159 a(n) = -Sum_{d|n, d<n} A008683(n/d)*A033879(d). %F A297159 Sum_{k=1..n} a(k) = (3/2 - 6/Pi^2 - Pi^2/12) * n^2 + O(n*log(n)). - _Amiram Eldar_, Dec 04 2023 %t A297159 a[n_] := 3*n - 2*EulerPhi[n] - DivisorSigma[1, n]; Array[a, 100] (* _Amiram Eldar_, Dec 04 2023 *) %o A297159 (PARI) A297159(n) = (3*n - 2*eulerphi(n) - sigma(n)); %o A297159 (PARI) A297159(n) = -sumdiv(n,d,(d<n)*moebius(n/d)*((2*d)-sigma(d))); %o A297159 (Python) %o A297159 from sympy import totient, divisor_sigma %o A297159 def a(n): return 3*n-2*totient(n)-divisor_sigma(n) %o A297159 print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Mar 02 2018 %Y A297159 Cf. A000010, A000203, A008683, A033879, A083254. %Y A297159 Cf. also A051709, A296074. %K A297159 sign,easy %O A297159 1,6 %A A297159 _Antti Karttunen_, Mar 02 2018