A008457 a(n) = Sum_{ d >= 1, d divides n} (-1)^(n-d)*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 + ...
References
- Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 77, Eq. (31.6).
- Emil Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 121, eq. (9.19).
- G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, p. 142.
- F. Hirzebruch, T. Berger and R. Jung, Manifolds and Modular Forms, Vieweg, 1994, pp. 77, 133.
- Hans Petersson, Modulfunktionen und Quadratische Formen, Springer-Verlag, 1982; p. 179.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..5000
- Meinhard Peters, Sums of nine squares, Acta Arith., Vol. 102 (2002), pp. 131-135.
Programs
-
Maple
(1/16)*product((1+q^n)^8/(1-q^n)^8,n=1..60);
-
Mathematica
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 *) a[n_] := DivisorSum[n, (-1)^(n-#)*#^3&]; Array[a, 40] (* Jean-François Alcover, Dec 01 2015 *) a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, x]^8 - 1) / 16, {x, 0, n}]; (* Michael Somos, Aug 10 2018 *) 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 *)
-
PARI
{a(n) = if( n<1, 0, (-1)^n * sumdiv(n, d, (-1)^d * d^3))}; /* Michael Somos, Sep 25 2005 */
-
Python
from math import prod from sympy import factorint 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
Formula
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
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
G.f.: Sum_{k>0} k^3 x^k/(1 - (-x)^k). - Michael Somos, Sep 25 2005
G.f.: (1/16)*(-1+(Product_{k>0} (1-(-q)^k)/(1+(-q)^k))^8). [corrected by Vaclav Kotesovec, Sep 26 2015]
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
A138503(n) = -(-1)^n * a(n).
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
G.f.: (theta_3(x)^8 - 1)/16, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 17 2018
Sum_{k=1..n} a(k) ~ Pi^4 * n^4 / 384. - Vaclav Kotesovec, Sep 21 2020
Comments