%I #68 Jun 21 2024 15:37:56
%S 1,7,28,71,126,196,344,583,757,882,1332,1988,2198,2408,3528,4679,4914,
%T 5299,6860,8946,9632,9324,12168,16324,15751,15386,20440,24424,24390,
%U 24696,29792,37447,37296,34398,43344,53747,50654,48020,61544,73458
%N a(n) = Sum_{ d >= 1, d divides n} (-1)^(n-d)*d^3.
%C The modular form (e(1)-e(2))(e(1)-e(3)) for GAMMA_0 (2) (with constant term -1/16 omitted).
%C a(n) = r_8(n)/16, where r_8(n) = A000143(n) is the number of integral solutions of Sum_{j=1..8} x_j^2 = n (with the order of the summands respected). See the Grosswald reference, and the Hardy reference, pp. 146-147, eq. (9.9.3) and sect. 9.10. - _Wolfdieter Lang_, Jan 09 2017
%D Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 77, Eq. (31.6).
%D Emil Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 121, eq. (9.19).
%D G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, p. 142.
%D F. Hirzebruch, T. Berger and R. Jung, Manifolds and Modular Forms, Vieweg, 1994, pp. 77, 133.
%D Hans Petersson, Modulfunktionen und Quadratische Formen, Springer-Verlag, 1982; p. 179.
%H G. C. Greubel, <a href="/A008457/b008457.txt">Table of n, a(n) for n = 1..5000</a>
%H Meinhard Peters, <a href="http://dx.doi.org/10.4064/aa102-2-2">Sums of nine squares</a>, Acta Arith., Vol. 102 (2002), pp. 131-135.
%F Multiplicative with a(2^e) = (8^(e+1)-15)/7, a(p^e) = (p^(3*e+3)-1)/(p^3-1), p > 2. - _Vladeta Jovovic_, Sep 10 2001
%F a(n) = (-1)^n*(sum of cubes of even divisors of n - sum of cubes of odd divisors of n), see A051000. Sum_{n>0} n^3*x^n*(15*x^n-(-1)^n)/(1-x^(2*n)). - _Vladeta Jovovic_, Oct 24 2002
%F G.f.: Sum_{k>0} k^3 x^k/(1 - (-x)^k). - _Michael Somos_, Sep 25 2005
%F G.f.: (1/16)*(-1+(Product_{k>0} (1-(-q)^k)/(1+(-q)^k))^8). [corrected by _Vaclav Kotesovec_, Sep 26 2015]
%F Dirichlet g.f. zeta(s)*zeta(s-3)*(1-2^(1-s)+2^(4-2s)), Dirichlet convolution of A001158 and the quasi-finite (1,-2,0,16,0,0,...). - _R. J. Mathar_, Mar 04 2011
%F A138503(n) = -(-1)^n * a(n).
%F Bisection: a(2*k-1) = A001158(2*k-1), a(2*k) = 8*A001158(k) - A051000(k), k >= 1. In the Hardy reference a(n) = sigma^*_3(n). - _Wolfdieter Lang_, Jan 07 2017
%F G.f.: (theta_3(x)^8 - 1)/16, where theta_3() is the Jacobi theta function. - _Ilya Gutkovskiy_, Apr 17 2018
%F Sum_{k=1..n} a(k) ~ Pi^4 * n^4 / 384. - _Vaclav Kotesovec_, Sep 21 2020
%e G.f. = q + 7*q^2 + 28*q^3 + 71*q^4 + 126*q^5 + 196*q^6 + 344*q^7 + 583*q^8 + ...
%p (1/16)*product((1+q^n)^8/(1-q^n)^8,n=1..60);
%t 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 *)
%t a[n_] := DivisorSum[n, (-1)^(n-#)*#^3&]; Array[a, 40] (* _Jean-François Alcover_, Dec 01 2015 *)
%t a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, x]^8 - 1) / 16, {x, 0, n}]; (* _Michael Somos_, Aug 10 2018 *)
%t f[2, e_] := (8^(e+1)-15)/7; f[p_, e_] := (p^(3*e+3)-1)/(p^3-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Sep 21 2020 *)
%o (PARI) {a(n) = if( n<1, 0, (-1)^n * sumdiv(n, d, (-1)^d * d^3))}; /* _Michael Somos_, Sep 25 2005 */
%o (Python)
%o from math import prod
%o from sympy import factorint
%o def A008457(n): return prod((p**(3*(e+1))-(1 if p&1 else 15))//(p**3-1) for p, e in factorint(n).items()) # _Chai Wah Wu_, Jun 21 2024
%Y Cf. A000143, A001158, A051000, A064027, A002129, A048272, A138503.
%K nonn,mult,easy
%O 1,2
%A _N. J. A. Sloane_