A296074 Sum of deficiencies of the proper divisors of n.
0, 1, 1, 2, 1, 4, 1, 3, 3, 6, 1, 5, 1, 8, 7, 4, 1, 9, 1, 9, 9, 12, 1, 2, 5, 14, 8, 13, 1, 16, 1, 5, 13, 18, 11, 3, 1, 20, 15, 8, 1, 24, 1, 21, 18, 24, 1, -9, 7, 27, 19, 25, 1, 20, 15, 14, 21, 30, 1, -1, 1, 32, 24, 6, 17, 40, 1, 33, 25, 40, 1, -27, 1, 38, 32, 37, 17, 48, 1, -1, 22, 42, 1, 9, 21, 44, 31, 26, 1, 18, 19, 45, 33, 48, 23, -36, 1, 53, 36, 33
Offset: 1
Examples
For n = 6, whose proper divisors are 1, 2, 3, their deficiencies are 1, 1, 2, thus a(6) = 1+1+2 = 4. For n = 12, whose proper divisors are 1, 2, 3, 4, 6, their deficiencies are 1, 1, 2, 1, 0, thus a(12) = 1+1+2+1+0 = 5.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
Programs
-
Mathematica
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] = 0; a[n_] := Module[{f = FactorInteger[n]}, 3 * Times @@ f1 @@@ f - Times @@ f2 @@@ f - 2*n]; Array[a, 100] (* Amiram Eldar, Dec 04 2023 *)
-
PARI
A033879(n) = ((2*n)-sigma(n)); A296074(n) = sumdiv(n,d,(d
A033879(d));
Formula
a(n) = Sum_{d|n, dA033879(d).
Sum_{k=1..n} a(k) ~ (Pi^2/4 - Pi^4/72 - 1) * n^2. - Amiram Eldar, Dec 04 2023