This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A358254 #11 Nov 06 2022 07:37:18 %S A358254 0,1,2,3,4,5,6,7,12,8,9,10,11,13,15,23,14,16,18,21,17,19,29,25,33,20, %T A358254 22,26,28,120,24,27,87,58,125,88,30,31,97,124,45,187,32,34,73,132,55, %U A358254 49,42,35,36,95,195,59,98,863,37,38,130,104,129,62,736,67,39,40,115,131,48,748,82,208,41 %N A358254 Lexicographically earliest sequence of distinct nonnegative integers on a square spiral such that the sum of the eight numbers around any chosen number ends in the chosen number. %C A358254 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. %C A358254 In the first 10000 terms the largest value is a(8526) = 9874588 while the smallest unused number is 902. %H A358254 Scott R. Shannon, <a href="/A358254/b358254.txt">Table of n, a(n) for n = 0..5000</a> %H A358254 Eric Angelini, <a href="http://cinquantesignes.blogspot.com/2022/10/9-frames-and-1-super-frame.html">9 frames and 1 super-frame</a>, personal blog CinquanteSignes.blogspot.com, Oct. 30, 2022. %e A358254 The square spiral begins: %e A358254 . %e A358254 . %e A358254 14--23--15--13--11 120 %e A358254 | | | %e A358254 16 4---3---2 10 28 %e A358254 | | | | | %e A358254 18 5 0---1 9 26 %e A358254 | | | | %e A358254 21 6---7--12---8 22 %e A358254 | | %e A358254 17--19--29--25--33--20 %e A358254 . %e A358254 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. %e A358254 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. %Y A358254 Cf. A358048, A358021, A358021, A344325, A344367, A354111, A343530. %K A358254 nonn,base %O A358254 0,3 %A A358254 _Eric Angelini_ and _Scott R. Shannon_, Nov 05 2022