OFFSET
1,2
COMMENTS
This sequence is the square spiral version of the Enots Wolley sequence A336957. The same rules for selecting the next number apply except that, instead of choosing the smallest unvisited number for a(n), the number closest to the starting n = 1 position which satisfies the selection rules is chosen. If two or more such numbers exist then the smallest is chosen.
The first term that differs from A336957 is a(9) = 77. See the examples below.
LINKS
Scott R. Shannon, Image of the first 100000 visited numbers on the square spiral. The colors are graduated across the spectrum from red to violet to indicate the relative visit order of the numbers. The starting 1 position is colored white. As the sequence cannot visit primes or prime powers many of the black unvisited squares form the typical diagonal-line pattern seen in the Ulam prime spiral.
EXAMPLE
The square spiral used is:
.
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(8) = 33 as a(7) = 12 = 2*2*3 and a(6) = 14 = 2*7, thus a(8) must contain 3 or 2 as a factor but not 2 or 7. As a(6) excludes 2 it must contain 3 as a factor, and another prime other than 3. The closest unvisited number to the starting 1 position that satisfies these conditions is 33.
a(9) = 77 as a(8) = 33 = 3*11 and a(7) = 12 = 2*2*3, thus a(9) must contain 3 or 11 as a factor but not 2 or 3. As a(7) excludes 3 it must contain 11 as a factor, and another prime other than 11. The smallest unvisited number satisfying these conditions is 55, which is sqrt(20) ~ 4.47 units from 1. However 77 is unvisited and also satisfies the conditions, and is only 4 units from 1, thus a(9) = 77. This is the first term that differs from A336957.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Jan 27 2021
STATUS
approved