login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A224213
Number of nonnegative solutions to x^2 + y^2 + z^2 + u^2 <= n.
9
1, 5, 11, 15, 20, 32, 44, 48, 54, 70, 88, 100, 108, 124, 148, 160, 165, 189, 219, 235, 253, 281, 305, 317, 329, 357, 399, 427, 439, 475, 523, 539, 545, 581, 623, 659, 688, 716, 764, 792, 810, 858, 918, 946, 970, 1030, 1078, 1102, 1110, 1154, 1226, 1274, 1304, 1352
OFFSET
0,2
FORMULA
G.f.: (1/(1 - x))*(Sum_{k>=0} x^(k^2))^4. - Ilya Gutkovskiy, Mar 14 2017
MATHEMATICA
nn = 50; t = Table[0, {nn}]; Do[d = x^2 + y^2 + z^2 + u^2; If[0 < d <= nn, t[[d]]++], {x, 0, nn}, {y, 0, nn}, {z, 0, nn}, {u, 0, nn}]; Accumulate[Join[{1}, t]] (* T. D. Noe, Apr 01 2013 *)
PROG
(Python)
for n in range(99):
k = 0
for x in range(99):
s = x*x
if s>n: break
for y in range(99):
sy = s + y*y
if sy>n: break
for z in range(99):
sz = sy + z*z
if sz>n: break
for u in range(99):
su = sz + u*u
if su>n: break
k+=1
print(str(k), end=', ')
CROSSREFS
Cf. A014110 (first differences).
Cf. A224212 (number of nonnegative solutions to x^2 + y^2 <= n).
Cf. A000606 (number of nonnegative solutions to x^2 + y^2 + z^2 <= n).
Cf. A046895 (number of integer solutions to x^2 + y^2 + z^2 + u^2 <= n).
Sequence in context: A314035 A314036 A314037 * A036787 A182664 A299976
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Apr 01 2013
STATUS
approved