login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A115607
Sum of odd divisors of n times (-1)^(n+1).
5
1, -1, 4, -1, 6, -4, 8, -1, 13, -6, 12, -4, 14, -8, 24, -1, 18, -13, 20, -6, 32, -12, 24, -4, 31, -14, 40, -8, 30, -24, 32, -1, 48, -18, 48, -13, 38, -20, 56, -6, 42, -32, 44, -12, 78, -24, 48, -4, 57, -31, 72, -14, 54, -40, 72, -8, 80, -30, 60, -24, 62, -32, 104, -1, 84, -48, 68, -18, 96, -48, 72, -13, 74, -38, 124
OFFSET
1,3
REFERENCES
C. G. J. Jacobi, Gesammelte Werke, Vol. 2, 1969, Chelsea, NY, p. 179, eq (6.).
LINKS
FORMULA
Moebius transform is [ 1, -2, 3, 0, 5, -6, 7, 0, 9, -10, 11, 0, ...].
a(n) is multiplicative with a(2^e) = -1 if e > 0, a(p^e) = (p^(e+1) - 1) / (p-1) if p > 2.
G.f.: (theta_2(q)^4 - theta_4(q)^4 + 1) / 24.
G.f.: Sum_{k>0} - k * (-x)^k / (1 + (-x)^k) = Sum_{k>0} x^k / (1 - (-x)^k)^2.
G.f.: Sum_{k>0} (2*k - 1) * x^(2*k - 1) / (1 + x^(2*k - 1)) = Sum_{k>0} x^k / (1 - x^k)^2 - 4 * x^(4*k - 2) / (1 - x^(4*k - 2))^2.
Empirical: Sum_{n>=1} exp(-Pi)^n*a(n) = 1/24. - Simon Plouffe, Feb 20 2011
Dirichlet g.f. (1-2^(1-s))^2*zeta(s)*zeta(s-1). - R. J. Mathar, Apr 06 2011
a(n) = -(-1)^n * A000593(n). -24 * a(n) = A103640(n) if n > 0.
G.f.: Sum_{k>0} -(-1)^k * x^k * (1 + x^(2*k)) / (1 - x^(2*k))^2. - Michael Somos, Jun 26 2012
L.g.f.: -log(Product_{ k>0 } (1+(-x)^k)) = Sum_{ n>=0 } (a(n)/n)*x^n. - Benedict W. J. Irwin, Jul 04 2016
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/48 = 0.205616... . - Amiram Eldar, Nov 12 2022
EXAMPLE
x - x^2 + 4*x^3 - x^4 + 6*x^5 - 4*x^6 + 8*x^7 - x^8 + 13*x^9 - 6*x^10 + 12*x^11 + ...
MAPLE
with(numtheory):
a:= n-> add(`if`(d::odd, -d, 0), d=divisors(n))*(-1)^n:
seq(a(n), n=1..75); # Alois P. Heinz, Apr 07 2017
MATHEMATICA
a[ n_] := If[ n < 1, 0, DivisorSum[ n, (-1)^(n + #) n / # &]] (* Michael Somos, Jun 17 2012 *)
a[ n_] := SeriesCoefficient[(EllipticTheta[ 2, 0, q]^4 - EllipticTheta[ 4, 0, q]^4 + 1) / 24, {q, 0, n}] (* Michael Somos, Jun 26 2012 *)
Table[CoefficientList[Series[-Log[QPochhammer[-1, -x]/2], {x, 0, 60}], x][[n + 1]] n, {n, 1, 60}] (* Benedict W. J. Irwin, Jul 04 2016 *)
PROG
(PARI) {a(n) = if( n<1, 0, sumdiv( n, d, (-1)^(n + d) * n/d))}
(PARI) {a(n) = if( n<1, 0, -(-1)^n * sumdiv( n, d, d%2*d))}
(Python)
from sympy import divisors
def a(n): return 0 if n<1 else -(-1)**n * sum([d%2*d for d in divisors(n)]) # Indranil Ghosh, Apr 09 2017
CROSSREFS
Sequence in context: A336113 A098986 A000593 * A318876 A330356 A329428
KEYWORD
sign,look,mult
AUTHOR
Michael Somos, Jan 26 2006
STATUS
approved