login
A232705
Number of Gaussian integers z satisfying (n-1)/2 < |z| < n/2.
5
0, 0, 4, 0, 8, 4, 8, 8, 20, 0, 16, 12, 24, 8, 28, 16, 28, 24, 40, 12, 32, 24, 44, 16, 48, 28, 48, 32, 52, 32, 40, 44, 64, 28, 72, 32, 76, 40, 72, 44, 56, 56, 84, 56, 80, 52, 88, 48, 92, 56, 92, 56, 96, 68, 88, 72, 108, 56, 104, 76, 112, 64, 124, 80, 104, 92, 112, 92, 120, 96, 116, 80, 144, 84
OFFSET
1,3
COMMENTS
Number of integer Cartesian grid points covered by a ring with width 1/2 and outer radius n/2.
For symmetry reasons, a(n) is a multiple of 4.
By bounds on the Gauss circle problem, a(n)/n -> Pi/2 as n -> infinity (see Wikipedia link). - Robert Israel and Peter Bala, Mar 26 2020
MAPLE
N:= 100: # for a(1)..a(N)
V:= Vector(N):
for x from 1 to N/2 do
for y from 1 to x do
r:= 2*sqrt(x^2 + y^2);
if r::integer then next fi;
n:= ceil(r);
if n > N then break fi;
if x = y then V[n]:= V[n]+4 else V[n]:= V[n]+8 fi
od od:
convert(V, list); # Robert Israel, Mar 26 2020
PROG
(PARI) a(n)=sum(i=-n, n, sum(j=-n, n, d=sqrt(i*i+j*j); if(d>(n-1)/2&&d<n/2, 1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, Nov 28 2013
STATUS
approved