login
A066536
Number of ways of writing n as a sum of n+1 squares.
4
1, 4, 12, 32, 90, 312, 1288, 5504, 22608, 88660, 339064, 1297056, 5043376, 19975256, 80027280, 321692928, 1291650786, 5177295432, 20748447108, 83279292960, 335056780464, 1351064867328, 5456890474248, 22063059606912
OFFSET
0,2
LINKS
FORMULA
a(n) equals the coefficient of x^n in the (n+1)-th power of Jacobi theta_3(x) where theta_3(x) = 1 + 2*Sum_{n>=1} x^(n^2). - Paul D. Hanna, Oct 26 2009
a(n) is divisible by n+1: a(n)/(n+1) = A166952(n) for n>=0. - Paul D. Hanna, Oct 26 2009
a(n) ~ c * d^n / sqrt(n), where d = 4.13273137623493996302796465... (= 1/radius of convergence A166952), c = 0.70710538549959357505200... . - Vaclav Kotesovec, Sep 10 2014
EXAMPLE
There are a(2)=12 solutions (x,y,z) of 2=x^2+y^2+z^2: 3 permutations of (1,1,0), 3 permutations of (-1,-1,0) and 6 permutations of (1, -1,0).
MATHEMATICA
Join[{1}, Table[SquaresR[n+1, n], {n, 24}]]
(* Calculation of constants {d, c}: *) {1/r, Sqrt[s/(2*Pi*r^2*Derivative[0, 0, 2][EllipticTheta][3, 0, r*s])]} /. FindRoot[{s == EllipticTheta[3, 0, r*s], r*Derivative[0, 0, 1][EllipticTheta][3, 0, r*s] == 1}, {r, 1/4}, {s, 5/2}, WorkingPrecision -> 70] (* Vaclav Kotesovec, Nov 16 2023 *)
PROG
(PARI) {a(n)=local(THETA3=1+2*sum(k=1, sqrtint(n), x^(k^2))+x*O(x^n)); polcoeff(THETA3^(n+1), n)} /* Paul D. Hanna, Oct 26 2009*/
CROSSREFS
Cf. A122141, A166952. - Paul D. Hanna, Oct 26 2009
Sequence in context: A276178 A120369 A001665 * A265212 A295500 A168078
KEYWORD
nonn
AUTHOR
Peter Bertok (peter(AT)bertok.com), Jan 07 2002
EXTENSIONS
Edited by Dean Hickerson, Jan 12, 2002
a(0) added by Paul D. Hanna, Oct 26 2009
Edited by R. J. Mathar, Oct 29 2009
STATUS
approved