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.

A237588 Sigma(n) - 2n + 1.

Original entry on oeis.org

0, 0, -1, 0, -3, 1, -5, 0, -4, -1, -9, 5, -11, -3, -5, 0, -15, 4, -17, 3, -9, -7, -21, 13, -18, -9, -13, 1, -27, 13, -29, 0, -17, -13, -21, 20, -35, -15, -21, 11, -39, 13, -41, -3, -11, -19, -45, 29, -40, -6, -29, -5, -51, 13, -37, 9, -33, -25, -57, 49, -59, -27, -21, 0
Offset: 1

Views

Author

Omar E. Pol, Feb 20 2014

Keywords

Comments

Also we can write Sigma(n) - (2n - 1).
a(n) = 2 - n iff n is prime.
a(n) = 1 iff n is a perfect number.
Conjecture: a(n) = 0 iff n is a power of 2.
The problem is not new. In fact, the following comments appeared on page 74 of Guy's book: "If Sigma(n) = 2*n - 1, n has been called almost perfect. Powers of 2 are almost perfect; it is not known if any other numbers are.". - Zhi-Wei Sun, Feb 23 2014

Examples

			-----------------------------------------------
.     The sum of       The positive
n    divisors of n     odd numbers        a(n)
-----------------------------------------------
1          1                1               0
2          3                3               0
3          4                5              -1
4          7                7               0
5          6                9              -3
6         12               11               1
7          8               13              -5
8         15               15               0
9         13               17              -4
10        18               19              -1
...
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, New York, 2004.

Crossrefs

Programs

  • Magma
    [1-2*n+SumOfDivisors(n): n in [1..100]]; // Vincenzo Librandi, Feb 25 2014
  • Mathematica
    Table[DivisorSigma[1,n]-2n+1,{n,70}] (* Harvey P. Dale, Nov 15 2014 *)
  • PARI
    vector(100, n, sigma(n)-2*n+1) \\ Colin Barker, Feb 21 2014
    

Formula

a(n) = A000203(n) - A005408(n-1) = 1 - n + A001065(n) = 1 - A033879(n) = 1 + A033880(n) = (-1)*A235796(n).
a(n) = A088580(n) - 2*n. - Omar E. Pol, Mar 23 2014