login
a(n) is the number of Gaussian integers z with 0 < |z| <= n/2.
3

%I #14 Mar 29 2020 17:12:19

%S 0,4,8,12,20,28,36,48,68,80,96,112,136,148,176,196,224,252,292,316,

%T 348,376,420,440,488,528,576,612,664,708,748,796,860,900,972,1008,

%U 1084,1128,1200,1256,1312,1372,1456,1516,1596,1652,1740,1792,1884,1960,2052,2120

%N a(n) is the number of Gaussian integers z with 0 < |z| <= n/2.

%H Robert Israel, <a href="/A333572/b333572.txt">Table of n, a(n) for n = 1..2000</a>

%p N:= 100: # for a(1)..a(N)

%p V:= Vector(N):

%p for x from 1 to N/2 do

%p for y from 0 to x do

%p v:= ceil(2*sqrt(x^2+y^2));

%p if v > N then break fi;

%p if y=x or y=0 then V[v]:= V[v]+4 else V[v]:= V[v]+8 fi

%p od od:

%p ListTools:-PartialSums(convert(V,list)); # _Robert Israel_, Mar 29 2020

%Y Cf. A004018, A232705, A333462, A333573.

%K nonn

%O 1,2

%A _Hugo Pfoertner_, Mar 27 2020