login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A036698 a(n)=number of Gaussian integers z=a+bi satisfying |z|<=n, a>0, b>=0. 1

%I

%S 0,1,3,7,12,20,28,37,49,63,79,94,110,132,153,177,199,225,252,282,314,

%T 343,379,413,448,490,530,572,613,657,705,750,802,852,906,963,1013,

%U 1073,1128,1194,1256,1315,1381,1447,1519,1590,1656

%N a(n)=number of Gaussian integers z=a+bi satisfying |z|<=n, a>0, b>=0.

%H <a href="/index/Ga#gaussians">Index entries for Gaussian integers and primes</a>

%F a(n) = n^2 * Pi/4 + O(n). - _Charles R Greathouse IV_, Apr 03 2013

%o (C)

%o typedef unsigned long ulong;

%o ulong A036698(ulong i)

%o {

%o const ulong ring = i*i;

%o ulong result = 0;

%o for(ulong a = 1; a <= i; a++)

%o {

%o const ulong a2 = a*a;

%o for(ulong b = 0; b <= i; b++)

%o {

%o ulong z = a2 + b*b;

%o if ( ring >= z ) result++;

%o }

%o }

%o return result;

%o } /* _Oskar Wieland_, Apr 02 2013 */

%o (PARI) a(n)=my(n2=n^2);sum(a=1,n,sqrtint(n2-a^2)+1) \\ _Charles R Greathouse IV_, Apr 03 2013

%Y a(n) = A000603(n) - n - 1.

%K nonn

%O 0,3

%A _Clark Kimberling_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 8 08:54 EDT 2020. Contains 333313 sequences. (Running on oeis4.)