login
A348022
The numbers visited on a square spiral when stepping to the smallest unvisited number that is visible from and shares a divisor > 1 with the current number. Start with 1 and 2.
3
1, 2, 4, 6, 3, 12, 9, 15, 5, 10, 14, 7, 21, 27, 18, 16, 8, 22, 11, 33, 30, 20, 24, 32, 26, 13, 39, 36, 28, 35, 25, 40, 44, 38, 19, 76, 34, 17, 68, 42, 45, 51, 48, 57, 66, 55, 60, 46, 23, 92, 58, 50, 62, 31, 155, 70, 49, 56, 63, 72, 64, 52, 65, 78, 54, 69, 84, 75, 85, 80, 94, 47, 188
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
Cf. A348025 (not visible), A331400, A335661, A063826, A332767, A347358.
Sequence in context: A329492 A163234 A366111 * A072984 A339671 A367198
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Sep 25 2021
STATUS
approved