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.

A209187 Sum of divisors of n minus cototient of n.

Original entry on oeis.org

1, 2, 3, 5, 5, 8, 7, 11, 10, 12, 11, 20, 13, 16, 17, 23, 17, 27, 19, 30, 23, 24, 23, 44, 26, 28, 31, 40, 29, 50, 31, 47, 35, 36, 37, 67, 37, 40, 41, 66, 41, 66, 43, 60, 57, 48, 47, 92, 50, 63, 53, 70, 53, 84, 57, 88, 59, 60, 59, 124, 61, 64, 77, 95, 67, 98, 67, 90, 71, 98, 71
Offset: 1

Views

Author

N. J. A. Sloane, Mar 05 2012

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(Plus @@ Divisors[n]) - (n - EulerPhi[n]), {n, 50}]
  • PARI
    a(n) = sigma(n) + eulerphi(n) - n; \\ Altug Alkan, Sep 30 2017
    
  • SageMath
    [sigma(n,1)+euler_phi(n)-n for n in range(1, 72)] # Stefano Spezia, Jul 20 2025

Formula

a(n) = A065387(n) - n. - Altug Alkan, Sep 30 2017
a(n) = A000203(n) - A051953(n). - Omar E. Pol, Sep 30 2017
Sum_{k=1..n} a(k) = c * n^2 / 2 + O(n*log(n)), where c = 6/Pi^2 + Pi^2/6 - 1 = 1.252861... . - Amiram Eldar, Dec 08 2023