OFFSET
1,5
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
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, New York, 2004.
FORMULA
EXAMPLE
-----------------------------------------------
. 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
...
MATHEMATICA
Table[DivisorSigma[1, n]-2n+1, {n, 70}] (* Harvey P. Dale, Nov 15 2014 *)
PROG
(PARI) vector(100, n, sigma(n)-2*n+1) \\ Colin Barker, Feb 21 2014
(Magma) [1-2*n+SumOfDivisors(n): n in [1..100]]; // Vincenzo Librandi, Feb 25 2014
CROSSREFS
KEYWORD
sign
AUTHOR
Omar E. Pol, Feb 20 2014
STATUS
approved