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 A359058 #47 Apr 01 2023 11:22:24 %S A359058 0,1,2,1,4,5,2,5,4,1,2,1,4,5,2,5,4,9,10,5,8,5,10,9,16,17,10,13,8,13, %T A359058 10,17,16,9,10,5,8,5,10,9,16,17,10,13,8,13,10,17,16,25,26,17,20,13,18, %U A359058 13,20,17,26,25,36,37,26,29,20,25,18,25,20,29,26,37,36,25,26,17,20,13,18,13,20 %N A359058 a(n) = squared distance to the origin of the n-th vertex on a counterclockwise undulating spiral in a square grid. %C A359058 The spiral coordinates are A359216 and A359217. %H A359058 Rémy Sigrist, <a href="/A359058/b359058.txt">Table of n, a(n) for n = 0..10081</a> %H A359058 Hans G. Oberlack, <a href="/A359058/a359058_1.pdf">Undulating counterclockwise spiral in a square grid</a> %H A359058 Rémy Sigrist, <a href="/A359058/a359058.gp.txt">PARI program</a> %F A359058 a(n) = A359216(n)^2 + A359217(n)^2. %e A359058 The spiral begins as follows and for instance point n=7 is at x=-2,y=1 so that a(7) = (-2)^2 + 1^2 = 5. %e A359058 y ^ %e A359058 | %e A359058 4 | 17--16 %e A359058 | | | %e A359058 3 | 13--10 9--10 %e A359058 | | | %e A359058 2 | 13---8 5---4 5---8 %e A359058 | | | | | %e A359058 1 | 17--10 5---2 1---2 5--10 %e A359058 | | | | | %e A359058 0 | 16---9 4---1 0---1 4---9 %e A359058 | | | | | %e A359058 -1 | 10---5 2---1 2---5 10--17 %e A359058 | | | | | %e A359058 -2 | 8---5 4---5 8--13 %e A359058 | | | %e A359058 -3 | 10---9 10--13 %e A359058 | | | %e A359058 -4 | 16--17 %e A359058 +------------------------------------> %e A359058 -4 -3 -2 -1 0 1 2 3 4 x %o A359058 (PARI) See Links section. %Y A359058 Cf. A001481, A336336, A359216, A359217. %K A359058 nonn,easy %O A359058 0,3 %A A359058 _Hans G. Oberlack_, Dec 14 2022