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.

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.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Jan 16 2020

Keywords

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.

Examples

			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