OFFSET
0,5
COMMENTS
A(n,k) is the number of ordered ways of writing n^2 as a sum of k squares.
LINKS
Alois P. Heinz, Antidiagonals n = 0..200, flattened
Eric Weisstein's World of Mathematics, Jacobi Theta Functions
FORMULA
A(n,k) = [x^(n^2)] (Sum_{j=-infinity..infinity} x^(j^2))^k.
EXAMPLE
Square array begins:
1, 1, 1, 1, 1, 1, ...
0, 2, 4, 6, 8, 10, ...
0, 2, 4, 6, 24, 90, ...
0, 2, 4, 30, 104, 250, ...
0, 2, 4, 6, 24, 730, ...
0, 2, 12, 30, 248, 1210, ...
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, k)-> b(n^2, k):
seq(seq(A(n, d-n), n=0..d), d=0..12); # Alois P. Heinz, Mar 10 2023
MATHEMATICA
Table[Function[k, SeriesCoefficient[EllipticTheta[3, 0, x]^k, {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten
Table[Function[k, SeriesCoefficient[Sum[x^i^2, {i, -n, n}]^k, {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Ilya Gutkovskiy, Apr 17 2018
STATUS
approved