OFFSET
1,6
COMMENTS
Sum of divisors of n, minus the number of divisors of n, minus n, plus 1.
Also, sum of proper divisors of n, minus the number of divisors of n, plus 1.
Note that if a(n)>0 then n is a composite number (A002808), otherwise, n is a noncomposite number (A008578) also called prime number at the beginning of the 20th century.
Also, sum of divisors of n, minus the number of proper divisors of n, minus n.
a(A008578(n)) = 0 for all n>=1. - Robert G. Wilson v, Dec 14 2008
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Joerg Arndt, On computing the generalized Lambert series, arXiv:1202.6525v3 [math.CA], (2012).
FORMULA
a(n) = A000203(n) - A000005(n) - n + 1 = A001065(n) - A000005(n) + 1 = A000203(n) - A062249(n) + 1 = A065608(n) - n + 1.
a(n) = A158901(n) - n. - Juri-Stepan Gerasimov, Sep 12 2009
From Peter Bala Jan 22 2021: (Start)
G.f.: A(q) = Sum_{n >= 2} (n-1)*q^(2*n)/(1 - q^n) = Sum_{n >= 2} q^(2*n)/(1 - q^n)^2. Cf. A001065.
Faster converging series: A(q) = Sum_{n >= 1} q^(n*(n+1))*((n-1)*q^(3*n+2) - n*q^(2*n+1) + (2-n)*q^(n+1) + n - 1)/((1 - q^n)*(1 - q^(n+1))^2) - apply the operator t*d/dt to equation 1 in Arndt, then set t = q^2 and x = q. (End)
MAPLE
A152770 := proc(n)
numtheory[sigma](n)-n-numtheory[tau](n)+1 ;
end proc: # R. J. Mathar, Sep 28 2011
MATHEMATICA
f[n_] := DivisorSigma[1, n] - DivisorSigma[0, n] - n + 1; Array[f, 105] (* Robert G. Wilson v, Dec 14 2008 *)
PROG
(PARI) a(n)=sigma(n)-n-numdiv(n)+1 \\ Charles R Greathouse IV, Mar 09 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Dec 12 2008
EXTENSIONS
More terms from Omar E. Pol and Robert G. Wilson v, Dec 14 2008
Definition clarified and edited by Omar E. Pol, Dec 21 2008
STATUS
approved