OFFSET
2,1
COMMENTS
a(n) = n - k where k is the sum of the divisors of n excluding 1 and n itself. The initial value for n is 2.
A value of 0 indicates a quasiperfect number, although no such number is known. - Felix Fröhlich, Jul 14 2014
a(n) is negative iff n is abundant (A005101). - Christian N. K. Anderson, May 02 2023
LINKS
Ferruccio Guidi, Table of n, a(n) for n=2..100001
Wikipedia, Quasiperfect number
FORMULA
a(n) = (2*n+1)-A000203(n). - Felix Fröhlich, Jul 14 2014
EXAMPLE
The divisors of 10 are 1, 2, 5 and 10, so a(10) = 10 - (2 + 5) = 3.
MATHEMATICA
Table[2n+1-DivisorSigma[1, n], {n, 70}] (* Harvey P. Dale, Jul 22 2013 *)
PROG
(PARI) for(n=2, 1e2, a=2*n+1; b=sigma(n); print1(a-b, ", ")) \\ Felix Fröhlich, Jul 14 2014
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Ferruccio Guidi (fguidi(AT)cs.unibo.it), Mar 01 2009
STATUS
approved