OFFSET
0,3
COMMENTS
The first two numbers placed when a new row or column is formed around the spiral do not complete a 3x3 block of numbers, thus they can be the lowest two numbers that have not appeared. Therefore the sequence a permutation of the nonnegative integers.
In the first 10000 terms the largest value is a(8526) = 9874588 while the smallest unused number is 902.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 0..5000
Eric Angelini, 9 frames and 1 super-frame, personal blog CinquanteSignes.blogspot.com, Oct. 30, 2022.
EXAMPLE
The square spiral begins:
.
.
14--23--15--13--11 120
| | |
16 4---3---2 10 28
| | | | |
18 5 0---1 9 26
| | | |
21 6---7--12---8 22
| |
17--19--29--25--33--20
.
a(8) = 12 as when the ninth cell is filled it completes a ring of eight numbers around the central cell with number 0, therefore the sum of these eight numbers must end in 0. The sum around the central cell when the eighth cell is filled is 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28, and the lowest unused number that can be added so that the sum ends in 0 is 28 + 12 = 40, so a(8) = 12.
a(29) = 120 as when the thirtieth cell is filled the sum of the previous numbers around the number 10 is 13 + 11 + 2 + 28 + 1 + 9 + 26 = 90, and since 20 has already appeared the smallest unused number that can be added to 90 to form a number that ends in 10 is 120.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Scott R. Shannon, Nov 05 2022
STATUS
approved