OFFSET
1,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4 and p. 8).
Heekyoung Hahn, Convolution sums of some functions on divisors, arXiv:1507.04426 [math.NT], 2015.
Michael Somos, Introduction to Ramanujan theta functions.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions.
FORMULA
Expansion of (1 - (eta(q)^2 / eta(q^2))^8) / 16 in powers of q.
a(n) is multiplicative with a(2^e) = -(8^(e+1) - 15) / 7, a(p^e) = ((p^3)^(e+1) - 1) / (p^3 - 1).
G.f.: Sum_{k>0} k^3 * -(-x)^k / (1 - x^k).
G.f.: Sum_{n >= 1} x^n*(1 - 4*x^n + x^(2*n))/(1 + x^n)^4. - Peter Bala, Jan 11 2021
EXAMPLE
G.f. = q - 7*q^2 + 28*q^3 - 71*q^4 + 126*q^5 - 196*q^6 + 344*q^7 - 583*q^8 + ...
MAPLE
with(numtheory):
a := n -> add( (-1)^(d-1)*d^3, d in divisors(n) ): seq(a(n), n = 1..40);
# Peter Bala, Jan 11 2021
MATHEMATICA
a[ n_] := If[ n < 0, 0, DivisorSum[ n, -(-1)^# #^3&]]; (* Michael Somos, Sep 25 2015 *)
a[ n_] := SeriesCoefficient[ (1 - EllipticTheta[ 4, 0, q]^8) / 16, {q, 0, n}]; (* Michael Somos, Sep 25 2015 *)
nmax = 40; Rest[CoefficientList[Series[-Product[((1-q^k)/(1+q^k))^8, {k, 1, nmax}]/16, {q, 0, nmax}], q]] (* Vaclav Kotesovec, Sep 26 2015 *)
f[p_, e_] := (p^(3*e + 3) - 1)/(p^3 - 1); f[2, e_] := 2 - (2^(3*e + 3) - 1)/7; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 40] (* Amiram Eldar, Nov 04 2022 *)
PROG
(PARI) {a(n) = if( n<0, 0, sumdiv(n, d, -(-1)^d * d^3))};
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Michael Somos, Mar 21 2008
EXTENSIONS
Simpler definition from N. J. A. Sloane, Nov 23 2018
STATUS
approved