login
Number of ways to write n^2 as an ordered sum of n^2 squares of integers.
2

%I #9 Mar 13 2023 09:17:01

%S 1,2,24,34802,509145568,142743029326162,715761543475698773496,

%T 63014651062141097287201438690,96683719664587866428237173383906926464,

%U 2573179910450886540215919614478751310457090316706,1184101051443285881265166362742300236491599013268534224381864

%N Number of ways to write n^2 as an ordered sum of n^2 squares of integers.

%H Alois P. Heinz, <a href="/A361431/b361431.txt">Table of n, a(n) for n = 0..40</a>

%F a(n) = [x^(n^2)] (Sum_{j=-oo..oo} x^(j^2))^(n^2).

%F a(n) = A066535(n^2).

%e a(2) = 24: 4 = x^2 + y^2 + z^2 + u^2 has 24 solutions (x,y,z,u): 16 permutations of (+/-1,+/-1,+/-1,+/-1) and 8 permutations of (+/-2,0,0,0).

%p b:= proc(n, t) option remember; `if`(n=0, 1, `if`(n<0 or t<1, 0,

%p b(n, t-1) +2*add(b(n-j^2, t-1), j=1..isqrt(n))))

%p end:

%p a:= n-> b(n^2$2):

%p seq(a(n), n=0..10);

%Y Cf. A000290, A066535.

%K nonn

%O 0,2

%A _Alois P. Heinz_, Mar 11 2023