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.

A295344 Maximum number of lattice points inside and on a circle of radius n.

Original entry on oeis.org

1, 5, 14, 32, 52, 81, 116, 157, 208, 258, 319, 384, 457, 540, 623, 716, 812, 914, 1025, 1142, 1268, 1396, 1528, 1669, 1816, 1976, 2131, 2300, 2472, 2650, 2836, 3028, 3228, 3436, 3644, 3859, 4080, 4314, 4548, 4792, 5038, 5289, 5555, 5818, 6092, 6376, 6668, 6952
Offset: 0

Views

Author

Arkadiusz Wesolowski, Nov 20 2017

Keywords

Comments

Maximum number of lattice points (i.e., points with integer coordinates) in the plane that can be covered by a circle of radius n.
a(n) >= A000328(n).
Conjecture: sequence contains infinitely many terms that are divisible by 4.

Examples

			For a circle centered at the point (x, y) = (1/2, 1/4) with radius 2, there are 14 lattice points inside and on the circle.
.
.     Center             # Pts in/
.    x      y    Radius  on circle
.  -----  -----  ------  ---------
.    0      0       1         5
.   1/2    1/4      2        14
.   1/2    1/2      3        32
.   1/2    1/2      4        52
.    0      0       5        81
.   1/2    1/3      6       116
.   2/5    1/5      7       157
.   1/2    1/2      8       208
.   1/2    2/9      9       258
.  20/47  19/56    10       319
.   1/2    1/2     11       384
.  11/23   7/20    12       457
.   1/2    1/2     13       540
.  10/21   3/13    14       623
.   1/2    1/2     15       716
.   1/2    1/2     16       812
.   2/5    2/5     17       914
.   3/8    5/14    18      1025
.   1/2    1/6     19      1142
.   9/19   8/17    20      1268
		

References

  • B. R. Srinivasan, Lattice Points in a Circle, Proc. Nat. Inst. Sci. India, Part A, 29 (1963), pp. 332-346.

Crossrefs

Programs

  • PARI
    L=List([]); for(n=0, 47, if(n>0, j=5, j=1); g=0; h=0; f=ceil(Pi*n^2); for(d=2, floor(f/2), for(c=1, floor(d/2), if(gcd(c, d)==1, for(e=d, d+1, if(e/f<=1/2, a=c/d; b=e/f; if(a+b>=1/2, t=0; for(x=-n, n+1, for(y=-n, n+1, z=(a-x)^2+(b-y)^2; if(z<=n^2,t++))); if(t>j, j=t; if(a>=b, g=a; h=b, g=b; h=a)))))))); print("a("n") = "j", the center of the circle is at point ("g", "h")."); listput(L, j)); print(); print(Vec(L));

Formula

a(n) = Pi*n^2 + O(n), as n goes to infinity.
a(n) = A123690(2*n) for n >= 1.

Extensions

a(10) corrected by Giovanni Resta, Nov 24 2017