login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A120883 (1/4)*number of lattice points with odd indices in a square lattice inside a circle around the origin with radius 2*n. 1
0, 1, 3, 8, 13, 20, 28, 39, 52, 64, 79, 96, 112, 135, 154, 179, 203, 228, 255, 281, 316, 349, 382, 416, 451, 494, 532, 573, 618, 661, 707, 756, 807, 859, 910, 963, 1015, 1076, 1137, 1198, 1256, 1321, 1386, 1452, 1523, 1594, 1667, 1737, 1808, 1889, 1965, 2046, 2123 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Lim_{n->infinity} a(n)/n^2 = Pi/4.

a(n) gives the number of positive half-points (for example, 1/2 and 3/2) inside or on the circle of radius n. - Jon Perry, Nov 04 2012

LINKS

Table of n, a(n) for n=0..52.

FORMULA

a(n) = Sum_{i=1..n} ceiling(sqrt(n^2 - (i - 1/2)^2) - 1/2). Proof outline: consider an integer grid (i,j), e.g., a pixel image. A positive half circle hull's boundary of radius n contains all points ('pixels') where (i - 1/2)^2 + (j - 1/2)^2 = n^2 => j = f(j) = sqrt(n^2 - (i - 1/2)^2) + 1/2. To obtain the number of elements of the hull's closure without non-positive points, count by upper Riemann sums with interval length 1: (n) = A(n) = Sum_{i=1..n} (ceiling(f(i)) - 1). ('i=1' discards the (0,j) points and '-1' cancels the (i,0) points.) - Johannes Hoentsch, Feb 26 2019

EXAMPLE

a(3)=8 because the 8 lattice points in the first quadrant (x,y) = {(1,1), (1,3), (3,1), (1,5), (5,1), (3,3), (3,5), (5,3)} all satisfy x^2 + y^2 < (2*3)^2.

a(3)=8 because (1/2,1/2), (1/2,3/2), (1/2,5/2), (3/2,1/2), (3/2,3/2), (3/2,5/2), (5/2,1/2) and (5/2,3/2) all satisfy x^2 + y^2 <= n^2. - Jon Perry, Nov 04 2012

PROG

(JavaScript)

for (i=0; i<50; i++) {

c=0;

for (a=1/2; a<=i; a++)

for (b=1/2; b<=i; b++)

if (Math.pow(a, 2)+Math.pow(b, 2)<=Math.pow(i, 2)) c++;

document.write(c+", ");

}

CROSSREFS

Cf. A001182.

Sequence in context: A208276 A242487 A303592 * A317195 A322598 A317194

Adjacent sequences:  A120880 A120881 A120882 * A120884 A120885 A120886

KEYWORD

nonn,changed

AUTHOR

Hugo Pfoertner, Jul 12 2006

EXTENSIONS

a(0) added by Jon Perry, Nov 04 2012

STATUS

approved

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 June 15 17:43 EDT 2019. Contains 324142 sequences. (Running on oeis4.)