A138503 a(n) = Sum_{d|n} (-1)^(d-1)*d^3.
1, -7, 28, -71, 126, -196, 344, -583, 757, -882, 1332, -1988, 2198, -2408, 3528, -4679, 4914, -5299, 6860, -8946, 9632, -9324, 12168, -16324, 15751, -15386, 20440, -24424, 24390, -24696, 29792, -37447, 37296, -34398, 43344, -53747, 50654, -48020, 61544, -73458
Offset: 1
Examples
G.f. = q - 7*q^2 + 28*q^3 - 71*q^4 + 126*q^5 - 196*q^6 + 344*q^7 - 583*q^8 + ...
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.
- Index entries for sequences mentioned by Glaisher.
Crossrefs
Programs
-
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 *)
-
PARI
{a(n) = if( n<0, 0, sumdiv(n, d, -(-1)^d * d^3))};
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
Extensions
Simpler definition from N. J. A. Sloane, Nov 23 2018
Comments