Number of times n = x^2 + y^2 + z^2 + w^2 with (x,y,z,w) integers and |x| <= |y| <= |z| <= |w|.

1, 2, 4, 8, 18, 4, 8, 16, 4, 10, 20, 8, 24, 20, 8, 16, 18, 12, 28, 24, 20, 24, 24, 16, 8, 22, 28, 32, 48, 12, 24, 32, 4, 32, 44, 24, 42, 36, 32, 32, 20, 20, 56, 40, 24, 44, 24, 32, 24, 42, 48, 32, 68, 28, 56, 48, 8, 48, 68, 32, 48, 44, 32, 64, 18, 32, 72, 56

0

Compare with S000884, which has the “x + y + z + w a square” requirement.

T. D. Noe, Plot of 10000 terms

T. D. Noe, Table of 10000 terms

Yu-Chen Sun and Zhi-Wei Sun, Two refinements of Lagrange's four-square theorem, arxiv 1605.03074 (May 10 2016)

(Mma) lim = 10; nn = (lim+1)^2; t = Table[0, {nn}]; Do[n = x^2 + y^2 + z^2 + w^2; If[n < nn, t[[n+1]]++], {x, -lim, lim}, {y, -Abs[x], Abs[x]}, {z, -Abs[y], Abs[y]}, {w, -Abs[z], Abs[z]}]; t

Cf. A002635 (partitions into 4 squares), S000884-S000890.

nonn,nice

T. D. Noe, May 11 2016