login
A000145
Number of ways of writing n as a sum of 12 squares.
10
1, 24, 264, 1760, 7944, 25872, 64416, 133056, 253704, 472760, 825264, 1297056, 1938336, 2963664, 4437312, 6091584, 8118024, 11368368, 15653352, 19822176, 24832944, 32826112, 42517728, 51425088, 61903776, 78146664, 98021616, 115331264, 133522752, 164079696, 201364416
OFFSET
0,2
COMMENTS
Apparently 8 | a(n). - Alexander R. Povolotsky, Oct 01 2011
REFERENCES
E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 121.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 314.
LINKS
Shi-Chao Chen, Congruences for rs(n), Journal of Number Theory, Volume 130, Issue 9, September 2010, Pages 2028-2032.
Simon Plouffe, Numbers in the base e^Pi, arXiv:2509.15609 [math.NT], 2025. See p. 10/24, marked 7.
FORMULA
Expansion of eta(q^2)^60 / (eta(q) * eta(q^4))^24 in powers of q.
Euler transform of period 4 sequence [24, -36, 24, -12, ...]. - Michael Somos, Sep 21 2005
G.f.: (Sum_k x^k^2)^12 = theta_3(q)^12.
a(2*n + 1) = A029751(2*n + 1) + 16 * A000735(n). - Michael Somos, Sep 21 2005 [corrected by Daniel Suteu, Apr 14 2026]
G.f. is a period 1 Fourier series which satisfies f(-1 / (4 t)) = 64 (t/i)^6 f(t) where q = exp(2 Pi i t).
a(n) = (24/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
Empirical: Sum_{n>=0} a(n) / exp(n*Pi) = Pi^3 / Gamma(3/4)^12 = A388081. - Simon Plouffe, Sep 14 2025
a(n) = 8*sigma_5(n) - f(n) + g(n), where f(n) = 512*sigma_5(n/4) if 4|n, else 0, and g(n) = 16*A000735((n-1)/2) if n is odd, else 0. - Daniel Suteu, Apr 13 2026
EXAMPLE
G.f. = 1 + 24*x + 264*x^2 + 1760*x^3 + 7944*x^4 + 25872*x^5 + 64416*x^6 + 133056*x^7 + ...
MAPLE
(sum(x^(m^2), m=-10..10))^12; # gives g.f. for first 100 terms
# Alternative:
t1:=(sum(x^(m^2), m=-n..n))^12; t2:=series(t1, x, n+1); t2[n+1]; # N. J. A. Sloane, Oct 01 2011
# Alternative:
A000145list := proc(len) series(JacobiTheta3(0, x)^12, x, len+1);
seq(coeff(%, x, j), j=0..len-1) end: A000145list(27); # Peter Luschny, Oct 02 2018
MATHEMATICA
SquaresR[12, Range[0, 30]] (* Harvey P. Dale, Sep 07 2012 *)
(* Alternative: *)
a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q]^12, {q, 0, n}]; (* Michael Somos, Aug 15 2015 *)
(* Alternative: *)
nmax = 30; CoefficientList[Series[Product[(1 - x^(2*k))^12 * (1 + x^(2*k - 1))^24, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jul 10 2018 *)
PROG
(PARI) {a(n) = if( n<0, 0, polcoeff( sum( k=1, sqrtint(n), 2 * x^k^2, 1 + x * O(x^n))^12, n))}; /* Michael Somos, Sep 21 2005 */
(PARI) a(n) = 8*sigma(n, 5) - if(n%4 == 0, 512*sigma(n/4, 5), 0) + if(n%2 == 1, 16*A000735((n-1)/2), 0); \\ Daniel Suteu, Apr 13 2026
(Magma) A := Basis( ModularForms( Gamma0(4), 6), 25); A[1] + 24*A[2] + 264*A[3] + 1760*A[4]; /* Michael Somos, Aug 15 2015 */
CROSSREFS
Row d=12 of A122141 and of A319574, 12th column of A286815.
Sequence in context: A296916 A187380 A286346 * A126904 A001413 A022065
KEYWORD
nonn,easy
STATUS
approved