OFFSET
1,3
COMMENTS
Also, Sum_{i|n, sqrt(n)<i<=n} i - Sum_{i|n, 1<=i<sqrt(n)} i.
REFERENCES
H. J. S. Smith, Report on the Theory of Numbers, reprinted in Vol. 1 of his Collected Math. Papers, Chelsea, NY, 1979, see p. 323.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: Sum_{k>0} x^(k^2+k)/(1-x^k)^2 . - Michael Somos, Nov 19 2005
MATHEMATICA
Table[DivisorSum[n, Abs[n/# - #] &, # <= Sqrt[n] &], {n, 71}] (* Michael De Vlieger, Mar 17 2021 *)
PROG
(PARI) a(n)=if(n<2, 0, sumdiv(n, d, abs(n/d-d))/2) /* Michael Somos, Nov 19 2005 */
(SageMath)
def A079667(n): return sum(n//d - d for d in divisors(n) if d*d <= n)
print([A079667(n) for n in range(1, 72)]) # Peter Luschny, Jan 01 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Jan 25 2003
STATUS
approved