OFFSET
1,1
COMMENTS
Any grid point with relative coordinates (x,y) from the central grid point, which is numbered 1, and where the greatest common divisor (gcd) of |x| and |y| equals 1 will be visible from the central point. Grid points where gcd(|x|,|y|) > 1 will have another point directly between it and the central point and will thus not be visible.
In an infinite 2D square lattice the ratio of visible grid points to all points is 6/pi^2, the same as the probability of two random numbers being relative prime.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..20000.
Scott R. Shannon, Image showing the grid points visible from point 1 for the first 100000 grid points. Each point is surrounded by a 1 X 1 square which is colored according to the visibility of the point is contains - yellow indicates those points visible from point 1, gray are those not visible. All squares are labeled with their corresponding point number in the Ulam spiral numbering. The spiral path tracing out the number ordering is also shown.
Eric Weisstein's World of Mathematics, Visible Point.
Wikipedia, Ulam Spiral.
EXAMPLE
a(1) = 2 to a(8) = 9 are the eight adjacent grid points to point 1, thus all are visible from that point.
a(9) = 10 is the first non-adjacent point to square 1, but as it is located at relative coordinates (2,-1) it is visible as gcd(|-2|,|1|) = 1.
The point numbered 11 is the first point not visible from point 1 as it has relative coordinates (2,0) and gcd(|2|,|0|) = 2.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Jan 16 2020
STATUS
approved