OFFSET
0,5
COMMENTS
A(n,k) is the number of nonnegative solutions to (x_1)^2 + (x_2)^2 + ... + (x_k)^2 <= n^2.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1274
Eric Weisstein's World of Mathematics, Jacobi Theta Functions
FORMULA
A(n,k) = [x^(n^2)] (1/(1 - x))*(Sum_{j>=0} x^(j^2))^k.
EXAMPLE
Square array begins:
1, 1, 1, 1, 1, 1, ...
1, 2, 3, 4, 5, 6, ...
1, 3, 6, 11, 20, 36, ...
1, 4, 11, 29, 70, 157, ...
1, 5, 17, 54, 165, 482, ...
1, 6, 26, 99, 357, 1203, ...
MATHEMATICA
Table[Function[k, SeriesCoefficient[(1 + EllipticTheta[3, 0, x])^k/(2^k (1 - x)), {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten
Table[Function[k, SeriesCoefficient[1/(1 - x) Sum[x^i^2, {i, 0, n}]^k, {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten
PROG
(PARI) T(n, k)={if(k==0, 1, polcoef(((sum(j=0, n, x^(j^2)) + O(x*x^(n^2)))^k)/(1-x), n^2))} \\ Andrew Howroyd, Sep 14 2019
CROSSREFS
KEYWORD
AUTHOR
Ilya Gutkovskiy, Apr 17 2018
STATUS
approved