OFFSET
1,1
COMMENTS
Sum of divisors of 2*n that do not divide n. - Franklin T. Adams-Watters, Oct 04 2018
a(n) = 2*n iff n = 2^k, k >= 0 (A000079). - Bernard Schott, Mar 24 2020
LINKS
Paul Tek, Table of n, a(n) for n = 1..10000
Octavio A. Agustín-Aquino, Wang-Sun formula in GL(Z/2kZ), Integers, Vol. 23 (2023), #A37.
FORMULA
a(n) = 2*A002131(n).
L.g.f.: -log(EllipticTheta(4,0,x)) = Sum_{ n>0 } (a(n)/n)*x^n. - Benedict W. J. Irwin, Jul 05 2016
G.f.: Sum_{k>=1} 2*k*x^k/(1 - x^(2*k)). - Ilya Gutkovskiy, Oct 23 2018
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/8 = 1.2337005... (A111003). - Amiram Eldar, Jan 19 2024
EXAMPLE
n=9: sigma(18)=18+9+6+3+2+1=39, sigma(9)=9+3+1=13, a(9)=39-13=26.
MAPLE
a:= proc(n) local e;
e:= 2^padic:-ordp(n, 2);
2*e*numtheory:-sigma(n/e)
end proc:
map(a, [$1..100]); # Robert Israel, Jul 05 2016
MATHEMATICA
Table[DivisorSigma[1, 2n]-DivisorSigma[1, n], {n, 70}] (* Harvey P. Dale, May 11 2014 *)
Table[CoefficientList[Series[-Log[EllipticTheta[4, 0, x]], {x, 0, 80}], x][[n + 1]] n, {n, 1, 80}] (* Benedict W. J. Irwin, Jul 05 2016 *)
PROG
(PARI) a(n)=sigma(2*n)-sigma(n) \\ Charles R Greathouse IV, Feb 13 2013
(Magma) [DivisorSigma(1, 2*n) - DivisorSigma(1, n): n in [1..70]]; Vincenzo Librandi, Oct 05 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, May 22 2000
STATUS
approved