OFFSET
1,2
COMMENTS
a(n) is the number of integers of the form (n+k)/(n-k) for k=0,1,2,...,n-1.
Inverse Moebius transform of A040001 (offset 1).
The number of partitions of 2n into exactly two parts (2n-i,i) such that i divides (2n-i). - Wesley Ivan Hurt, Dec 22 2013
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
Vaclav Kotesovec, Graph - the asymptotic ratio
FORMULA
a(n) = A069930(n) + 1.
If n is an odd prime, then a(n)=3.
Asymptotic formula: 1/n*Sum(i=1, n, a(i)) = C*log(n) + o(log(n)) with C=3/2. [corrected by Vaclav Kotesovec, Feb 13 2019]
Also lim_{n -> infinity} card(i<n, a(i) even)/card(i<n, a(i) odd) = 0.
G.f.: Sum_{n>0} x^n(1 - x^(3n))/((1 - x^n)(1 - x^(2n))).
a(n) = d(2n) - 1, where d(n) is the number of divisors of n (A000005). - Wesley Ivan Hurt, Dec 22 2013
a(n) = n - A234306(n). - Antti Karttunen, Dec 22 2013
a(n) = Sum_{i=1..n} floor(2*n/i) - floor((2*n-1)/i). - Wesley Ivan Hurt, Nov 15 2017
Sum_{k=1..n} a(k) ~ n/2 * (3*log(n) + log(2) + 6*gamma - 5), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 13 2019
EXAMPLE
a(4)=3 because (4+0)/(4-0), (4+2)/(4-2), (4+3)/(4-3) are integers.
MAPLE
MATHEMATICA
Table[DivisorSigma[0, 2 n] - 1, {n, 100}] (* Wesley Ivan Hurt, Dec 22 2013 *)
PROG
(PARI) a(n)=if(n<1, 0, sumdiv(n, d, (d>1)+d%2))
(PARI) {a(n)=if(n<1, 0, numdiv(2*n)-1)} /* Michael Somos, Sep 03 2006 */
(Magma) [DivisorSigma(0, 2*n) -1: n in [1..100]]; // G. C. Greubel, Feb 13 2019
(Sage) [sigma(2*n, 0) -1 for n in (1..100)] # G. C. Greubel, Feb 13 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Jan 11 2002
STATUS
approved