OFFSET
1,2
COMMENTS
A number is visible from the current number if, given it has coordinates (x,y) relative to the current number, the greatest common divisor of |x| and |y| equals 1. See A331400 for the points visible from the starting 1 number.
In the first 10000 terms the longest single step is one at n = 9942 of length sqrt(22570) units between 31002 to 10258. The maximum difference between terms in the same range is from 5171 to 36197 at n = 9977.
LINKS
Scott R. Shannon, Image of the path for the first 10000 terms. The colors are graduated across the spectrum to show the relative step order.
EXAMPLE
The square spiral is numbered as follows:
.
17--16--15--14--13 .
| | .
18 5---4---3 12 29
| | | | |
19 6 1---2 11 28
| | | |
20 7---8---9--10 27
| |
21--22--23--24--25--26
.
a(3) = 4 as gcd(4,2) = 2 and 4 is unvisited and visible from 2.
a(4) = 6 as gcd(4,6) = 2 and 6 is unvisited and visible from 4.
a(5) = 3 as gcd(3,6) = 3 and 3 is unvisited and visible from 6.
a(6) = 12 as gcd(12,3) = 3 and 12 is unvisited and visible from 3. Note although 9 is unvisited and gcd(9,3) = 3 it is not visible from 3 due to 2.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Sep 25 2021
STATUS
approved