login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000606 Number of nonnegative solutions to x^2 + y^2 + z^2 <= n.
(Formerly M3294 N1329)
13

%I M3294 N1329 #38 Feb 01 2022 01:04:15

%S 1,4,7,8,11,17,20,20,23,29,35,38,39,45,51,51,54,63,69,72,78,84,87,87,

%T 90,99,111,115,115,127,133,133,136,142,151,157,163,169,178,178,184,

%U 199,205,208,211,223,229,229,230,239,254,260,266,278,290,290,296

%N Number of nonnegative solutions to x^2 + y^2 + z^2 <= n.

%D H. Gupta, A Table of Values of N_3(t), Proc. National Institute of Sciences of India, 13 (1947), 35-63.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H T. D. Noe, <a href="/A000606/b000606.txt">Table of n, a(n) for n = 0..1000</a>

%F G.f.: (1/(1 - x))*(Sum_{k>=0} x^(k^2))^3. - _Ilya Gutkovskiy_, Mar 14 2017

%t nn = 50; t = Table[0, {nn}]; Do[d = x^2 + y^2 + z^2; If[0 < d <= nn, t[[d]]++], {x, 0, nn}, {y, 0, nn}, {z, 0, nn}]; Accumulate[Join[{1}, t]] (* _T. D. Noe_, Apr 01 2013 *)

%o (Python)

%o for n in range(99):

%o k = 0

%o for x in range(99):

%o s = x*x

%o if s > n: break

%o for y in range(99):

%o sy = s + y*y

%o if sy > n: break

%o for z in range(99):

%o sz = sy + z*z

%o if sz > n: break

%o k += 1

%o print(str(k), end=',')

%o # _Alex Ratushnyak_, Apr 01 2013

%Y Cf. A000604, A117609.

%Y Cf. A002102 (first differences).

%K nonn

%O 0,2

%A _N. J. A. Sloane_

%E More terms from _Sean A. Irvine_, Dec 01 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)