%I #37 Apr 25 2024 09:12:02
%S -1,0,0,2,0,6,0,7,4,10,0,18,0,14,12,18,0,27,0,28,16,22,0,44,8,26,18,
%T 38,0,56,0,41,24,34,20,70,0,38,28,66,0,76,0,58,48,46,0,98,12,67,36,68,
%U 0,94,28,88,40,58,0,140,0,62,62,88,32,116,0,88,48,112,0,159,0,74
%N a(n) = (sum of divisors of n) - phi(n) - (number of divisors of n).
%C Always >= 0 for n >= 2. a(n)=0 if and only if n is prime.
%C If n is an even semiprime > 4 (A100484), then a(n) = n. - _Wesley Ivan Hurt_, Dec 25 2013
%D József Sándor, Dragoslav S. Mitrinovic, and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Chapter I, p. 10, section I.3.1.a (but they have "tau" instead of "sigma").
%H T. D. Noe, <a href="/A046520/b046520.txt">Table of n, a(n) for n = 1..10000</a>
%H N. J. A. Sloane, <a href="http://neilsloane.com/doc/sg.txt">My favorite integer sequences</a>, in Sequences and their Applications (Proceedings of SETA '98).
%F a(n) = A000203(n) - A000010(n) - A000005(n).
%p with(numtheory); A046520:=n->sigma(n)-phi(n)-tau(n); seq(A046520(n), n=1..100); # _Wesley Ivan Hurt_, Dec 25 2013
%t DivisorSigma[1, #] - EulerPhi[#] - DivisorSigma[0, #] & /@ Range[74] (* _Jayanta Basu_, Jun 27 2013 *)
%o (PARI) a(n) = {my(f = factor(n)); sigma(f) - eulerphi(f) - numdiv(f);} \\ _Amiram Eldar_, Apr 25 2024
%Y Cf. A000203, A000010, A000005, A079538, A079539, A100484.
%K sign,easy,changed
%O 1,4
%A _N. J. A. Sloane_
%E Corrected by _Dean Hickerson_, Dec 19 2006
|