cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A224213 Number of nonnegative solutions to x^2 + y^2 + z^2 + u^2 <= n.

This page as a plain text file.
%I A224213 #12 Apr 08 2021 12:58:47
%S A224213 1,5,11,15,20,32,44,48,54,70,88,100,108,124,148,160,165,189,219,235,
%T A224213 253,281,305,317,329,357,399,427,439,475,523,539,545,581,623,659,688,
%U A224213 716,764,792,810,858,918,946,970,1030,1078,1102,1110,1154,1226,1274,1304,1352
%N A224213 Number of nonnegative solutions to x^2 + y^2 + z^2 + u^2 <= n.
%F A224213 G.f.: (1/(1 - x))*(Sum_{k>=0} x^(k^2))^4. - _Ilya Gutkovskiy_, Mar 14 2017
%t A224213 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 *)
%o A224213 (Python)
%o A224213 for n in range(99):
%o A224213   k = 0
%o A224213   for x in range(99):
%o A224213     s = x*x
%o A224213     if s>n: break
%o A224213     for y in range(99):
%o A224213         sy = s + y*y
%o A224213         if sy>n: break
%o A224213         for z in range(99):
%o A224213             sz = sy + z*z
%o A224213             if sz>n: break
%o A224213             for u in range(99):
%o A224213               su = sz + u*u
%o A224213               if su>n: break
%o A224213               k+=1
%o A224213   print(str(k), end=', ')
%Y A224213 Cf. A014110 (first differences).
%Y A224213 Cf. A224212 (number of nonnegative solutions to x^2 + y^2 <= n).
%Y A224213 Cf. A000606 (number of nonnegative solutions to x^2 + y^2 + z^2 <= n).
%Y A224213 Cf. A046895 (number of integer solutions to x^2 + y^2 + z^2 + u^2 <= n).
%K A224213 nonn
%O A224213 0,2
%A A224213 _Alex Ratushnyak_, Apr 01 2013