login
Sum of deficiencies of divisors of n.
7

%I #18 Dec 04 2023 01:39:38

%S 1,2,3,3,5,4,7,4,8,8,11,1,13,12,13,5,17,6,19,7,19,20,23,-10,24,24,22,

%T 13,29,4,31,6,31,32,33,-16,37,36,37,-2,41,12,43,25,30,44,47,-37,48,34,

%U 49,31,53,8,53,6,55,56,59,-49,61,60,46,7,63,28,67,43,67,36,71,-78,73,72,58,49,75,36,79,-27,63,80,83,-47,83

%N Sum of deficiencies of divisors of n.

%C a(n)=0 for n in A066218. Are 1 and 12 the only solutions to a(n)=1? - _Robert Israel_, Dec 04 2017

%H Antti Karttunen, <a href="/A296075/b296075.txt">Table of n, a(n) for n = 1..16384</a>

%F a(n) = Sum_{d|n} A033879(d).

%F a(n) = A296074(n) + A033879(n).

%F If m and n are coprime, a(m*n) = 2*a(m)*A000203(n)+2*a(n)*A000203(m)-a(m)*a(n)-2*A000203(m)*A000203(n). - _Robert Israel_, Dec 04 2017

%F a(n) = 2*A000203(n) - A007429(n). - _Ridouane Oudra_, Jul 29 2019

%F Sum_{k=1..n} a(k) ~ (Pi^2/6 - Pi^4/72) * n^2. - _Amiram Eldar_, Dec 04 2023

%e For n = 6, whose divisors are 1, 2, 3, 6, their deficiencies are 1, 1, 2, 0, thus a(6) = 1 + 1 + 2 + 0 = 4.

%e For n = 24, whose divisors are 1, 2, 3, 4, 6, 8, 12, 24, their deficiencies are 1, 1, 2, 1, 0, 1, -4, -12, thus a(24) = 1 + 1 + 2 + 1 + 0 + 1 + -4 + -12 = -10.

%p f:= n -> add(2*t-numtheory:-sigma(t), t=numtheory:-divisors(n)):

%p map(f, [$1..100]); # _Robert Israel_, Dec 04 2017

%t f1[p_, e_] := (p^(e+1)-1)/(p-1); f2[p_, e_] := (p*(p^(e+1)-1) - (p-1)*(e+1))/(p-1)^2; a[1] = 1; a[n_] := Module[{f = FactorInteger[n]}, 2 * Times @@ f1 @@@ f - Times @@ f2 @@@ f]; Array[a, 100] (* _Amiram Eldar_, Dec 04 2023 *)

%o (PARI)

%o A033879(n) = ((2*n)-sigma(n));

%o A296075(n) = sumdiv(n,d,A033879(d));

%Y Cf. A000203, A033879, A066218, A296074.

%Y Cf. also A007429, A187793, A187794, A187795.

%K sign,easy

%O 1,2

%A _Antti Karttunen_, Dec 04 2017