OFFSET
1,3
REFERENCES
C. G. J. Jacobi, Gesammelte Werke, Vol. 2, 1969, Chelsea, NY, p. 179, eq (6.).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
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
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
KEYWORD
AUTHOR
Michael Somos, Jan 26 2006
STATUS
approved