A348673 The numbers visited on a square spiral when stepping to the closest unvisited number such that the sum of that number and the current number is composite. If two or more such numbers exist then the smallest is chosen.
1, 8, 7, 20, 19, 6, 4, 5, 16, 17, 18, 39, 38, 37, 63, 36, 62, 61, 34, 15, 3, 12, 13, 14, 32, 31, 56, 55, 30, 54, 87, 88, 89, 130, 129, 177, 128, 127, 86, 85, 84, 51, 26, 25, 10, 11, 28, 27, 53, 52, 50, 49, 80, 79, 47, 46, 23, 22, 44, 21, 42, 43, 72, 71, 70, 41, 40, 68, 67, 66, 103, 102
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(2) = 8 as of the four closest neighbors to 1, namely 2,4,6 and 8, only 1+8=9 forms a composite number. a(7) = 4 as the closest unvisited number to 6 is 5, but 6+5=11 is prime. The next two closest unvisited numbers are 4 and 18 both of which sum to composites, but 4 is chosen as that is the smaller of the two.
Links
- Scott R. Shannon, Image of the path after 500000 steps. The colors are graduated across the spectrum to show the relative step order. Notice how green and purple colored paths, representing visited numbers after about 250000 and 450000 steps, approach the origin, marked with a white dot, via previously unvisited numbers.
Comments