|
|
A036702
|
|
a(n)=number of Gaussian integers z=a+bi satisfying |z|<=n, a>=0, 0<=b<=a.
|
|
5
|
|
|
1, 2, 4, 7, 10, 15, 20, 25, 32, 40, 49, 57, 66, 78, 89, 102, 114, 128, 142, 158, 175, 190, 209, 227, 245, 267, 288, 310, 331, 354, 379, 402, 429, 455, 483, 512, 538, 569, 597, 631, 663, 693, 727, 761, 798, 834, 868, 906, 943, 983
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(n) = sum(floor(sqrt(n^2 - m^2)) - (m-1), m = 0.. floor(n/sqrt(2))), n >= 0. See A255250. - Wolfdieter Lang, Mar 15 2015
|
|
MAPLE
|
local a, x, y ;
a := 0 ;
for x from 0 do
if x^2 > n^2 then
return a;
fi ;
for y from 0 to x do
if y^2+x^2 <= n^2 then
a := a+1 ;
end if;
end do;
end do:
|
|
MATHEMATICA
|
a[n_] := Module[{a, b}, If[n == 0, 1, Reduce[a^2 + b^2 <= n^2 && a >= 0 && 0 <= b <= a, {a, b}, Integers] // Length]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|