login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A036695
a(n)=number of Gaussian integers z=a+bi satisfying |z|<=n, b>=0.
3
1, 4, 9, 18, 29, 46, 63, 82, 107, 136, 169, 200, 233, 278, 321, 370, 415, 468, 523, 584, 649, 708, 781, 850, 921, 1006, 1087, 1172, 1255, 1344, 1441, 1532, 1637, 1738, 1847, 1962, 2063, 2184, 2295, 2428, 2553, 2672, 2805, 2938
OFFSET
0,2
COMMENTS
Number of ordered pairs of integers (x,y) with x^2 + y^2 <= n^2 and y >= 0. [Reinhard Zumkeller, Jan 23 2012]
FORMULA
Partial sums of A036696. - Sean A. Irvine, Nov 22 2020
MATHEMATICA
a[n_] := (k = 0; Do[If[x^2 + y^2 <= n^2, k++], {x, -n, n}, {y, 0, n}]; k); Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 08 2016 *)
PROG
(Haskell)
a036695 n = length [(x, y) | x <- [-n..n], y <- [0..n], x^2 + y^2 <= n^2]
-- Reinhard Zumkeller, Jan 23 2012
CROSSREFS
KEYWORD
nonn
STATUS
approved