OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
John Holley-Reid and Jeremy Rouse, The number of representations of n as a growing number of squares, arXiv:1910.01001 [math.NT], 2019.
FORMULA
a(n) equals the coefficient of x^n in the n-th power of Jacobi theta_3(x) where theta_3(x) = 1 + 2*Sum_{n>=1} x^(n^2). - Paul D. Hanna, Oct 25 2009
a(n) ~ c * d^n / sqrt(n), where d = 4.13273137623493996302796465... (= 1/radius of convergence A166952), c = 0.2820942036723951157919967... . - Vaclav Kotesovec, Sep 12 2014
EXAMPLE
There are a(3) = 8 solutions (x,y,z) of 3 = x^2 + y^2 + z^2: (1,1,1), (-1,-1,-1), 3 permutations of (1,1,-1) and 3 permutations of (1,-1,-1).
MAPLE
b:= proc(n, t) option remember; `if`(n=0, 1, `if`(n<0 or t<1, 0,
b(n, t-1) +2*add(b(n-j^2, t-1), j=1..isqrt(n))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..30); # Alois P. Heinz, Jul 16 2014
MATHEMATICA
Join[{1}, Table[SquaresR[n, n], {n, 24}]]
PROG
(PARI) {a(n)=local(THETA3=1+2*sum(k=1, sqrtint(n), x^(k^2))+x*O(x^n)); polcoeff(THETA3^n, n)} /* Paul D. Hanna, Oct 25 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 25 2009
Edited by R. J. Mathar, Oct 29 2009
STATUS
approved