OFFSET
1,2
COMMENTS
On the standard square spiral a number is not 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| is greater than 1. For this sequence at least one other number must also exist on the line connecting these two numbers for them to be hidden from each other. Most visited primes are stepped over by subsequent terms. See the first linked image.
See A331400 for the points visible from the starting 1 number.
LINKS
Scott R. Shannon, Image showing the path taken when connecting the first 1000 terms. The colors are graduated across the spectrum to show the relative step order, while the points represent the visited primes. The central 1 number is shown as a larger yellow square.
Scott R. Shannon, Image showing the path taken when connecting the first 50000 terms.
Eric Weisstein's World of Mathematics, Visible Point.
Wikipedia, Ulam Spiral.
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(1) = 1 is the central starting number.
a(2) = 11 as the numbers 2..10 are all visible from 1, while 11 is hidden by 2. After stepping to 11 the number 1 is removed.
a(3) = 6 as the numbers 2..5 are all visible from 11, while 6 is hidden by 2. After stepping to 6 the number 11 is removed.
a(4) = 14 as the numbers 2..5,7..10,12,13 are all visible from 6, while 14 is hidden by 4. After stepping to 14 the number 6 is removed. This is the first term that differs from A347357 as here the number 1 has been removed thus 2 is visible from 6.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Sep 04 2021
STATUS
approved