cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A120883 (1/4)*number of lattice points with odd indices in a square lattice inside a circle around the origin with radius 2*n.

Original entry on oeis.org

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
Offset: 0

Views

Author

Hugo Pfoertner, Jul 12 2006

Keywords

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

Examples

			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
		

Crossrefs

Cf. A001182.

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 nonpositive 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

Extensions

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