cp's OEIS Frontend

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.

A079667 a(n) = (1/2) * Sum_{d divides n} abs(n/d-d).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 6, 9, 8, 12, 10, 16, 12, 18, 16, 21, 16, 27, 18, 28, 24, 30, 22, 40, 24, 36, 32, 42, 28, 50, 30, 49, 40, 48, 36, 65, 36, 54, 48, 66, 40, 72, 42, 70, 60, 66, 46, 92, 48, 77, 64, 84, 52, 96, 60, 92, 72, 84, 58, 126, 60, 90, 82, 105, 72, 120, 66, 112, 88, 114, 70
Offset: 1

Views

Author

Vladeta Jovovic, Jan 25 2003

Keywords

Comments

Also, Sum_{i|n, sqrt(n)

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.

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, Abs[n/# - #] &, # <= Sqrt[n] &], {n, 71}] (* Michael De Vlieger, Mar 17 2021 *)
  • 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

Formula

a(n) = A070038(n) - A066839(n).
G.f.: Sum_{k>0} x^(k^2+k)/(1-x^k)^2 . - Michael Somos, Nov 19 2005