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 A305575 #35 Jun 21 2023 01:23:30 %S A305575 0,1,0,-1,0,1,-1,-1,1,2,0,-2,0,2,1,-1,-2,-2,-1,1,2,2,-2,-2,2,3,0,-3,0, %T A305575 3,1,-1,-3,-3,-1,1,3,3,2,-2,-3,-3,-2,2,3,4,0,-4,0,4,1,-1,-4,-4,-1,1,4, %U A305575 3,-3,-3,3,4,2,-2,-4,-4,-2,2,4,5,4,3,0,-3,-4,-5,-4,-3,0,3,4,5,1,-1 %N A305575 List points (x,y) having integer coordinates, sorted first by radial coordinate r and in case of ties, by polar angle 0 <= phi < 2*Pi in a polar coordinate system. Sequence gives x-coordinates. %C A305575 Similar to A283307, but with secondary sorting by polar angle. %H A305575 Hugo Pfoertner, <a href="/A305575/b305575.txt">Table of n, a(n) for n = 0..17664</a> (covering range r <= 75). %H A305575 Hugo Pfoertner, <a href="/A305575/a305575.pdf">Illustration of A305576 vs A305575</a>. %H A305575 Rainer Rosenthal, <a href="/A305575/a305575.gif">Coloured Circular Visualization of Spiral [A305575,A305576]</a> %e A305575 The first points (listing [polar angle phi,x,y]) are: %e A305575 r^2 %e A305575 0: [0.0*Pi,0,0]; %e A305575 1: [0.0*Pi,1,0], [0.5*Pi,0,1], [1.0*Pi,-1,0], [1.5*Pi,0,-1]; %e A305575 2: [0.25*Pi,1,1], [0.75*Pi,-1,1], [1.25*Pi,-1,-1], [1.75*Pi,1,-1]; %e A305575 4: [0.0*Pi,2,0], [0.5*Pi,0,2], [1.0*Pi,-2,0], [1.5*Pi,0,-2]; %e A305575 5: [0.148*Pi,2,1], [0.352*Pi,1,2], [0.648*Pi,-1,2], [0.852*Pi,-2,1], %e A305575 [1.148*Pi,-2,-1], [1.352*Pi,-1,-2], [1.648*Pi,1,-2], [1.852*Pi,2,-1]; %e A305575 8: [0.25*Pi,2,2], [0.75*Pi,-2,2], [1.25*Pi,-2,-2], [1.75*Pi,2,-2]. %o A305575 (PARI) atan2(y,x)=if(x>0,atan(y/x),if(x==0,if(y>0,Pi/2,-Pi/2),if(y>=0,atan(y/x)+Pi,atan(y/x)-Pi))); %o A305575 angle(x,y)=(atan2(y,x)+2*Pi)%(2*Pi); %o A305575 {a004018(n) = if( n<1, n==0, 4 * sumdiv( n, d, (d%4==1) - (d%4==3)))}; %o A305575 xyselect=1; \\ change to 2 for A305576 %o A305575 print1(0,", ");for(s=1,25,my(r=a004018(s));if(r>0,my(v=matrix(r,3),w=vector(r),m=sqrtint(s),L=0);for(i=-m,m,my(k=s-i^2,kk);if(k==0,v[L++,1]=i;v[L,2]=0;v[L,3]=angle(i,0),if(issquare(k),kk=sqrtint(k);forstep(j=-kk,kk,kk+kk,v[L++,1]=i;v[L,2]=j;v[L,3]=angle(i,j)))));p=vecsort(v[,3],,1);for(k=1,L,w[k]=v[p[k],xyselect]);for(k=1,L,print1(w[k],", ")))); \\ _Hugo Pfoertner_, May 12 2019 %Y A305575 For the y-coordinates see A305576. %Y A305575 Cf. A000328, A004018, A283307, A283308, A307014, A307016, A307017, A308080, A308081. %K A305575 sign,look %O A305575 0,10 %A A305575 _Hugo Pfoertner_, Jun 05 2018