A331027
The records for distance squared for step lengths between adjacent primes in A330979, the visited primes for a walk stepping to the closest unvisited prime on the Ulam Spiral.
Original entry on oeis.org
1, 2, 4, 8, 10, 32, 74, 90, 136, 290, 360, 388, 394, 674, 802, 872, 1184, 1394, 3316, 4100, 5300, 5634, 10728, 23098, 25128, 26836, 33508, 53954, 61092, 66610, 92858, 187540, 190120, 215104, 217732, 955620
Offset: 1
The below table shows the details of the record step lengths of this sequence. The coordinate is relative to the starting 1-square.
--------------------------------------------------------------------------------
a(n) | A330979 step # | Start prime & coord | End prime & coord |
--------------------------------------------------------------------------------
1 | 1 | 1 (0,0) | 2 (1,0) |
2 | 3 | 3 (1,1) | 11 (2,0) |
4 | 8 | 59 (2,4) | 61 (0,4) |
8 | 14 | 193 (-3,7) | 101 (-5,5) |
10 | 38 | 167 (4,-6) | 83 (5,-3) |
32 | 59 | 631 (13,7) | 1103 (17,3) |
74 | 169 | 113 (-3,-5) | 53 (4,0) |
90 | 319 | 17239 (66,12) | 22291 (75,15) |
136 | 1152 | 2719 (-26,12) | 4127 (-32,2) |
290 | 1659 | 13187 (19,-57) | 7907 (30,-44) |
360 | 2607 | 45263 (0,-106) | 40283 (-18,-100) |
388 | 7397 | 29723 (-86,-52) | 35509 (-94,-70) |
394 | 7806 | 47653 (-109,-19) | 59663 (-122,-4) |
674 | 7877 | 83101 (-144,-12) | 114419 (-169,-5) |
802 | 24920 | 2637497 (-812,692) | 2515477 (-793,713) |
872 | 27038 | 1285799 (-409,567) | 1170607 (-423,541) |
1184 | 55427 | 720089 (-288,-424) | 653761 (-316,-404) |
1394 | 56478 | 460349 (-339,-325) | 457687 (-304,-338) |
3316 | 56480 | 452293 (-300,-336) | 410203 (-320,-282) |
4100 | 82533 | 156353 (198,130) | 129263 (158,180) |
5300 | 83192 | 394211 (-140,314) | 331697 (-208,288) |
5634 | 165879 | 63589 (-126,42) | 161761 (-201,45) |
10728 | 237806 | 1034387 (509,-411) | 962543 (491,-309) |
23098 | 556765 | 110603 (-120,-166) | 19249 (-3,-69) |
25128 | 770967 | 7070333 (1330,-1278) | 8614337 (1468,-1356) |
26836 | 1074758 | 3213377 (-576,-896) | 3582083 (-420,-946) |
33508 | 1074809 | 4140079 (-129,-1017) | 2995469 (-27,-865) |
53954 | 2257389 | 67480409 (-1709,-4107) | 72669481 (-1882,-4262) |
61092 | 2644510 | 5269679 (790,1148) | 5492621 (544,1172) |
66610 | 2644988 | 1156873 (366,538) | 694591 (417,285) |
92858 | 2669627 | 109789 (166,62) | 122443 (-117,175) |
187540 | 2730402 | 2509621 (-792,228) | 672787 (-410,24) |
190120 | 2730411 | 193771 (-220,50) | 296827 (74,-272) |
215104 | 2730444 | 1505201 (285,-613) | 4506473 (405,-1061) |
217732 | 8160823 | 61908241 (-3934,1118) | 48110423 (-3468,1142) |
955620 | 8165267 | 22147771 (-2353,1019) | 8236981 (-1435,1355) |
A332767
The squares visited on the 2D square (Ulam) spiral when starting at square 1 and then stepping to the closest unvisited square which contains a composite number. If two or more squares are the same distance from the current square then the one with the smallest composite number is chosen.
Original entry on oeis.org
1, 4, 15, 14, 33, 32, 30, 55, 54, 87, 86, 85, 52, 27, 10, 9, 8, 6, 18, 39, 38, 36, 35, 16, 34, 60, 95, 94, 93, 58, 57, 56, 88, 129, 128, 177, 176, 175, 126, 125, 84, 51, 26, 25, 24, 46, 45, 22, 21, 20, 40, 69
Offset: 1
a(2) = 4 as the starting square numbered 1 has three adjacent squares 1 unit away with numbers 4,6,8, and 4 is the smallest number of those.
a(4) = 14 as the previous visited square 15 has three unvisited adjacent composite number 14,16,34, and 14 is the smallest number of those.
a(7) = 30 as the previous number 32 is has three primes and one visited composite square one unit away. The next closest unvisited composites, sqrt(2) units away, are 30,58,60, and 30 is the smallest of those.
- Scott R. Shannon, Illustration of a section of the walk up to n = 450. This shows how the square with number 12, which has four adjacent primes 1 unit away, is not visited during the initial part of the walk. Various other unvisited composites can also be seen.
- Scott R. Shannon, Illustration of the walk up to n = 1000000. The color of each step is graduated across the spectrum from red to violet to show the relative visit order of the squares. The starting square is shown as a white dot and the smallest unvisited composite square with number 12 is shown as a yellow dot. Note the walk steps shown in yellow which make a detour toward the central squares after about 150,000 steps. Click on the image to zoom in.
- Wikipedia, Ulam Spiral.
A335661
The squares visited on a square (Ulam) spiral, with a(1) = 1 and a(2) = 2, when stepping to the closest unvisited square containing a number that shares a common divisor > 1 with the number in the current square. If two or more such squares are the same distance from the current square then the one with the smallest number is chosen.
Original entry on oeis.org
1, 2, 4, 6, 8, 22, 20, 40, 18, 39, 69, 105, 150, 104, 66, 38, 36, 63, 98, 62, 34, 14, 12, 3, 15, 5, 35, 60, 33, 30, 55, 88, 54, 87, 129, 177, 234, 299, 455, 375, 456, 374, 300, 235, 130, 90, 57, 93, 135, 186, 134, 92, 58, 32, 56, 91, 133, 182, 132, 180, 237
Offset: 1
a(3) = 4 as a(2) = 2 is surrounded by eight adjacent squares with numbers 3,4,1,8,9,10,11,12. The unvisited squares 1 unit away, 3,9,11 have no common factor with 2. Of the other squares sqrt(2) units away, 4,8,10,12, all share the common factor 2 with a(2), and the smallest of those is 4.
a(10) = 39 as a(9) = 18 is surrounded by adjacent squares 5,6,19,40,39,38,17,16. The square containing 39 is 1 unit directly left of 18 and shares the common factor 3. The other squares one unit away, 5,17,19, have no common factor with 18.
- Scott R. Shannon, Image of the steps from 1 to 20001. The green dot shows the starting square 1, the red dot the final square 26453, and the yellow dot the smallest unvisited square 11. The orange line shows the largest step distance, sqrt(976), from a(8538) = 233 to a(8539) = 3029. The blue line shows the longest run of adjacent diagonal steps, each of length sqrt(2), to a lower even number in the same direction, from a(3747) = 7880 and lasts for 19 steps. The pink line shows the largest change in value for a single step, from a(19032) = 15023 to a(19033) = 25159, a difference of 10136.
- Scott R. Shannon, Image of the steps from 1 to 20001 with color. The color of each step is graduated across the spectrum from red to violet to show the relative visit order of the squares. Note how green colored steps, those around n = 10000, approach the origin, showing that all numbers near the origin may eventually be visited for very large values of n.
- Scott R. Shannon, Image of the steps from 1 to 100000. The orange line shows the step length of sqrt(28517) units at a(97528), from 5981 to 167468. The blue line shows the new longest run of adjacent diagonal steps to lower even numbers, a series of 24 steps. The yellow dot shows the new lowest unvisited square 13, square 11 being visited at a(26321).
- Scott R. Shannon, Image of the steps from 1 to 5000000 with color. Note how some violet colored steps, those around n = 4200000, approach the origin. The yellow dot shows the new lowest unvisited square 37, square 13 being visited at a(105263). Also note the visited area forms a roughly square pattern, following the largest outer numbers of the spiral. This becomes more pronounced as n increases.
A335364
The squares visited on the Ulam spiral when starting at square 1 and then stepping to the closest visible unvisited square which contains a prime number. If two or more visible squares are the same distance from the current square then the one with the smallest prime number is chosen.
Original entry on oeis.org
1, 2, 3, 11, 29, 13, 31, 59, 89, 131, 179, 127, 83, 53, 5, 17, 37, 67, 103, 149, 101, 61, 97, 139, 191, 251, 193, 137, 313, 389, 311, 241, 307, 379, 461, 383, 467, 557, 463, 761, 653, 757, 647, 751, 863, 983, 643, 547, 457, 239, 181, 233, 173, 229, 293, 227, 223, 167, 521, 433, 353, 281
Offset: 1
- Scott R. Shannon, Table of n, a(n) for n = 1..20001
- Scott R. Shannon, Image for the steps from n = 1 to 20001 with color. The starting square a(1) = 1 is shown as a white dot and the square a(20001) = 220019 is shown as a red dot. The smallest unvisited prime after 20000 steps, 107, is shown as a yellow dot. The color of each step is graduated across the spectrum from red to violet to show the relative visit order of the squares.
- Scott R. Shannon, Image for the steps from n = 1 to 5000000 with color. Note that some violet colored steps, corresponding to n values over 4000000, approach the origin, indicating earlier unvisited prime squares near the origin may eventually be visited after a large number of steps.
A344325
Squares visited on a spirally numbered board when stepping to the closest unvisited square which contains a number that shares no digit with the number of the current square. If two or more such squares are the same distance away the one with the smaller number is chosen.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 25, 48, 79, 80, 49, 26, 51, 84, 125, 83, 50, 81, 52, 86, 53, 28, 11, 27, 85, 126, 87, 54, 29, 30, 55, 88, 129, 56, 31, 58, 93, 57, 90, 131, 89, 130, 92, 135, 94, 137, 95, 60, 33, 14, 32, 59, 13, 62, 35, 16, 34, 15, 36, 17, 38, 67, 104, 66, 37, 64, 99, 100, 65, 102
Offset: 1
The board is numbered with the square spiral:
.
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) = 2 as from 1 there are four numbers one unit away, 2,4,6,8, none of which contain the digit 1, so of these the smallest is chosen, which is 2.
a(11) = 25 as from the square 10 the square with 25 is only one unit away and shares no digit with 10.
a(20) = 83 as the four squares one unit away from 125 have been visited or contain digits 1,2 or 5. The square with 83 is diagonally adjacent to 125 and is the first time a square more than one unit away is stepped to.
a(23) = 52, and is the first square stepped to that is not adjacent to the previous square, being three units away from 81. All closer squares have been either visited or contain a 1 or 8 in their number.
A344367
Squares visited on a spirally numbered board when stepping to the closest unvisited square that contains a number that shares one or more digits with the number of the current square. If two or more such squares are the same distance away the one with the smaller number is chosen.
Original entry on oeis.org
1, 11, 10, 12, 13, 14, 15, 16, 17, 18, 19, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 3, 23, 22, 21, 20, 40, 41, 42, 43, 44, 45, 46, 47, 24, 25, 26, 27, 28, 29, 2, 52, 51, 50, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 59, 58, 57, 56, 55, 54, 53, 125, 124, 123, 122, 121, 120
Offset: 1
The board is numbered with the square spiral:
.
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) = 11. There are three squares 2 units away from the starting square 1 that also contain the digit 1 - 11, 15, and 19. Of these 11 is the smallest so is the square stepped to.
a(3) = 10. Of the two adjacent squares to 11 that also contain the digit 1 the square 10 is the smallest.
a(4) = 12. This is the only unvisited square within 2 units of a(3) = 10 that also contains the digit 1.
a(12) = 39. This is the only unvisited square within sqrt(2) units of a(11) = 19 that contains either the digit 3 or 9. It is also the first square stepped to that does not share the digit 1 with the previous square.
A336413
Squares visited by a chess rook moving on a square-spiral numbered board where the rook moves to the closest unvisited square containing a prime number. In case of a tie it chooses the square with the smallest prime number.
Original entry on oeis.org
1, 2, 3, 5, 7, 41, 43, 109, 107, 103, 37, 193, 191, 97, 101, 199, 197, 683, 677, 673, 1753, 1747, 1429, 1427, 887, 883, 661, 659, 881, 877, 307, 461, 463, 653, 1129, 1733, 2083, 2081, 3323, 3319, 3797, 3793, 5419, 5417, 5413, 4297, 2861, 2857, 2447, 2069, 1723, 1721, 1409, 1123, 1117, 1399
Offset: 1
The board is numbered with the square spiral:
.
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, the starting square for the rook.
a(2) = 2. The four unvisited prime numbered squares around a(1) the rook can move to are numbered 2,61,19,23. Of these 2 is the closest, being 1 unit away.
a(3) = 3. The three unvisited prime numbered squares around a(2) = 2 the rook can move to are numbered 47,11,3. Both 11 and 3 are 1 units away, and of those 3 is the smallest.
a(7) = 43. The three unvisited prime numbered squares around a(6) = 41 the rook can move to are numbered 37,43,107. Both 43 and 107 are 2 units away, and of those 43 is the smallest. Note that 37, the smallest available prime, is 4 units away.
a(230) = 8887. There is only one unvisited prime numbered square around a(229) = 2143 the rook can move to. The square 8887 is 24 units away to the left of 2143.
- Scott R. Shannon, Image showing the 350 steps of the rook's path. A green square shows the starting 1 square, a red square shows the final square with number 2179, and a thick white line is the path between visited squares. All visited prime numbered squares are shown in yellow, while those unvisited squares containing primes are shown in grey. The four squares which block the rook's movement from the final square are shown with a red border. The square spiral numbering of the board is shown as a thin white line. Click on the image to zoom in to see the prime numbers.
Cf.
A336402,
A336446,
A336447,
A330979,
A000040,
A063826,
A214664,
A214665,
A136626,
A115258,
A331027.
A336447
Squares visited by a chess rook moving on a square-spiral numbered board where the rook moves to an unvisited square containing the smallest prime number.
Original entry on oeis.org
1, 2, 3, 5, 7, 41, 37, 31, 29, 521, 509, 337, 109, 43, 47, 83, 89, 179, 173, 359, 353, 349, 113, 293, 307, 311, 313, 317, 191, 97, 101, 103, 107, 691, 683, 197, 193, 1429, 1427, 887, 883, 661, 659, 653, 463, 461, 457, 181, 467, 479, 1163, 1171, 331, 673, 677, 1153, 1151, 487, 491, 199
Offset: 1
The board is numbered with the square spiral:
.
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, the starting square for the rook.
a(2) = 2. The four unvisited prime numbered squares around a(1) the rook can move to are numbered 2,61,19,23. Of these 2 is the smallest.
a(7) = 37. The three unvisited prime numbered squares around a(6) = 41 the rook can move to are numbered 37,43,107. Of those 37 is the smallest. Note that 43 is the closest prime, being only 2 units away while 37 is 4 units away.
a(135) = 863. The final square. The three previously visited prime numbered squares around a(135) are numbered 191,859,1709. Note there is no fourth prime as the column of squares directly upward from 863 contains no primes; the values from 871,994,1125,... and beyond fit the quadratic 4n^2+119n+871, which can be factored as (4n+67)*(n+13), and thus contains no primes.
- Scott R. Shannon, Image showing the 134 steps of the rook's path. A green square shows the starting 1 square, a red square shows the final square with number 863, and a thick white line is the path between visited squares. All visited prime numbered squares are shown in yellow, while those unvisited squares containing primes are shown in grey. The three squares which block the rook's movement from the final square are shown with a red border. The square spiral numbering of the board is shown as a thin white line. Click on the image to zoom in to see the prime numbers.
Cf.
A336446,
A336402,
A336413,
A330979,
A000040,
A063826,
A214664,
A214665,
A136626,
A115258,
A331027.
A347358
The prime numbers visited on a square spiral when starting at 1 and then stepping to the smallest unvisited prime number that is visible from the current number.
Original entry on oeis.org
1, 2, 3, 11, 5, 13, 29, 17, 7, 19, 31, 23, 37, 53, 41, 61, 43, 59, 47, 71, 83, 67, 89, 73, 101, 79, 107, 127, 97, 131, 103, 137, 109, 139, 113, 149, 173, 151, 179, 157, 181, 163, 191, 167, 193, 227, 197, 229, 293, 233, 211, 239, 199, 251, 223, 257, 307, 241, 311, 263, 313, 269, 317, 271, 331, 277
Offset: 1
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. The central starting number.
a(2) = 2, a(3) = 3 as 2 is the smallest visible unvisited prime from 1, and 3 is the smallest visible unvisited prime from 2.
a(4) = 11 as 11 is the smallest visible unvisited prime from 3. Note that from 3 the smaller unvisited primes 5 and 7 are hidden from 3 by the numbers 4 and 1.
a(7) = 29 as 29 is the smallest visible unvisited prime from 13. Note that from 13 the smaller unvisited primes 7, 17, 19, 23 are hidden from 13 by numbers 3, 14, 4, 2 respectively.
- Scott R. Shannon, Image of the path for the first 7000 terms. The colors are graduated across red, orange, yellow to show the relative step order. Note the yellow lines, terms in the 5000-7000 range, step in all directions across the entire spiral.
- Scott R. Shannon, Image of the path for the first 14000 terms. The colors are now graduated across red, orange, yellow, green, blue. Note how the steps for the later colors, terms in the 1000-14000 range, are almost all horizontal or vertical and none step diagonally into the inner spiral.
- Scott R. Shannon, Image of the path for the first 21000 terms. The colors are now graduated across red, orange, yellow, green, blue, indigo, violet. Note how the later colors, terms in the 15000-21000 range, again behave like the earlier 5000-7000 term range and step in random directions across the spiral.
- Eric Weisstein's World of Mathematics, Visible Point.
- Wikipedia, Ulam Spiral.
A336402
Squares visited by a chess queen moving on a square-spiral numbered board where the queen moves to the closest unvisited square containing a prime number. In case of a tie it chooses the square with the smallest prime number.
Original entry on oeis.org
1, 2, 3, 11, 29, 13, 31, 59, 61, 97, 139, 191, 251, 193, 101, 103, 67, 37, 17, 5, 19, 7, 23, 47, 79, 163, 281, 353, 283, 433, 521, 617, 523, 619, 439, 359, 223, 167, 227, 293, 229, 173, 83, 233, 127, 53, 179, 131, 89, 137, 389, 313, 311, 467, 383, 307, 241, 239, 181, 457, 547, 643
Offset: 1
The board is numbered with the square spiral:
.
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, the starting square for the queen.
a(2) = 2. The seven unvisited prime numbered squares around a(1) the queen can move to are numbered 2,3,61,5,19,7,23. Of these 2 is the closest, being 1 unit away. There are no primes in the south-east direction from a(1).
a(4) = 11. The four unvisited prime numbered squares around a(3) = 3 the queen can move to are numbered 11,29,13,5, the other two directions not having any primes. Both 11 and 13 are sqrt(2) units away, and of those 11 is the smallest.
a(40) = 227. The three unvisited prime numbered squares around a(39) = 167 the queen can move to are numbered 227,173,53, Of these 227 is the closest, being 4 units away. Note that the square with prime number 83 is only sqrt(10), about 3.16, units away but is at relative coordinates (1,3) to 167 so cannot be reach by the queen.
- Scott R. Shannon, Image showing the 519 steps of the queen's path. A green square shows the starting 1 square, a red square shows the final square with number 1289, and a thick white line is the path between visited squares. All visited prime numbered squares are shown in yellow, while those unvisited squares containing primes are shown in grey. The eight squares which block the queen's movement from the final square are shown with a red border. The square spiral numbering of the board is shown as a thin white line. Click on the image to zoom in to see the prime numbers.
Cf.
A336413,
A336446,
A336447,
A330979,
A000040,
A063826,
A214664,
A214665,
A136626,
A115258,
A331027.
Showing 1-10 of 23 results.
Comments