OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
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
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