A348026 The numbers visited on a square spiral when stepping to the smallest unvisited number that does not differ by 1 from the current number, is visible from the current number, and does not share a divisor > 1 with the current number.
1, 3, 8, 5, 2, 7, 4, 9, 11, 14, 19, 6, 13, 18, 23, 10, 17, 12, 29, 15, 22, 27, 16, 21, 32, 39, 20, 31, 24, 35, 26, 33, 25, 28, 41, 34, 45, 38, 47, 30, 37, 44, 51, 40, 57, 46, 53, 42, 55, 36, 43, 52, 49, 54, 59, 50, 61, 48, 65, 56, 67, 58, 69, 62, 73, 60, 71, 64, 75, 68, 63, 74, 83, 70, 81, 85
Offset: 1
Keywords
Examples
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) = 8 as gcd(8,3) = 1 and 8 is unvisited, visible from 3, and does not equal 2 or 4. a(4) = 5 as gcd(5,8) = 1 and 5 is unvisited, visible from 8, and does not equal 7 or 9. a(5) = 2 as gcd(2,5) = 1 and 2 is unvisited, visible from 5, and does not equal 4 or 6.
Links
- Scott R. Shannon, Image of the path for the first 20000 terms. The colors are graduated across the spectrum to show the relative step order.
Comments