Number of lattice points

1.6k Views Asked by At

Does there exist a formula for counting the number of lattice points not outside of a square , with the at most information available concerning the square are the position coordinates of the four corners of the square ?

2

There are 2 best solutions below

2
On

Consider the square with vertices $(2,0), (4,2), (2,4), $ and $(0,2)$, then I think there are $13 $ points not lying outside the square. But here $n=2\sqrt {2}$ and $(1+[n])^2=9.$

4
On

What about the square with corners $(\pm1/2,\pm1/2)$? Here $n=1$ is an integer, but there's only one lattice point, the origin, not outside the square, not 4.