OFFSET
1,3
COMMENTS
Terms are broken into digits before entering the spiral.
The sequence is finite. After 181 terms (and 466 digits) the number 101 is entered. The next square is surrounded by digits 0,1,8 so the only available digit is 8. As 8 has already appeared in the sequence another digit must be added to form a new number, but the next square is now surrounded with digits 0,1,3,8, and it is not possible to find a digit such that its sum with each of those digits is not prime.
.
4---0---4---6---2---2---4---2---2---8---1
| |
4 4---0---6---6---8---4---8---2---8 0
| | | |
. 0 4---6---4---2---4---8---2 8 1
. | | | | |
. 0 8 0---4---4---2---2 2 7 7
. | | | | | | |
. 4 6 4 0---8---8 7 7 7 1
. | | | | | | | | |
. 2 2 4 4 0---1 7 9 3 5
. | | | | | | | |
. 2 6 2 6---8---8---7 5 1 3
. | | | | | |
. 2 4 2---2---6---2---7---3 3 5
. | | | |
. 2 6---6---6---8---8---7---1---3 1
. | |
. 2---6---3---6---0---1---7---3---3---3
.
EXAMPLE
The eight digits that are in contact with the initial zero are 1, 8, 8, 0, 4, 6, 8, 8: none of them is prime [forcing the sum a(k) + 0 to be nonprime, with k<9]; more generally, no term of the square spiral added to any of its eight nearest neighbors sums to a prime.
CROSSREFS
KEYWORD
base,nonn,fini
AUTHOR
Eric Angelini and Scott R. Shannon, May 26 2021
STATUS
approved