

A331400


The grid points visible from the central point of an infinite 2D square lattice where all grid points are numbered as in the Ulam spiral.


4



2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45, 47, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 83, 84, 85, 87, 88, 89, 90, 92, 93, 94, 95, 97, 98, 99, 100, 102, 103, 104, 105, 107, 108, 109, 110, 112, 113, 114, 115
(list;
graph;
refs;
listen;
history;
text;
internal format)



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 labelled 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 nonadjacent 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

Cf. A063826, A157426, A157428, A325604, A325606.
Sequence in context: A119823 A172432 A317622 * A067082 A102685 A032960
Adjacent sequences: A331397 A331398 A331399 * A331401 A331402 A331403


KEYWORD

nonn


AUTHOR

Scott R. Shannon, Jan 16 2020


STATUS

approved



