login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A283308 List points (x,y) having integer coordinates, sorted first by x^2+y^2 and in case of ties, by x-coordinate and then by y-coordinate. Sequence gives y-coordinates. 7

%I #22 Jun 18 2018 09:17:47

%S 0,0,-1,1,0,-1,1,-1,1,0,-2,2,0,-1,1,-2,2,-2,2,-1,1,-2,2,-2,2,0,-3,3,0,

%T -1,1,-3,3,-3,3,-1,1,-2,2,-3,3,-3,3,-2,2,0,-4,4,0,-1,1,-4,4,-4,4,-1,1,

%U -3,3,-3,3,-2,2,-4,4,-4,4,-2,2,0,-3,3,-4,4,-5,5,-4,4,-3,3,0,-1,1,-5,5,-5,5

%N List points (x,y) having integer coordinates, sorted first by x^2+y^2 and in case of ties, by x-coordinate and then by y-coordinate. Sequence gives y-coordinates.

%e The first few points (listing [x^2+y^2,x,y]) are: [0, 0, 0], [1, -1, 0], [1, 0, -1], [1, 0, 1], [1, 1, 0], [2, -1, -1], [2, -1, 1], [2, 1, -1], [2, 1, 1], [4, -2, 0], [4, 0, -2], [4, 0, 2], [4, 2, 0], [5, -2, -1], [5, -2, 1], [5, -1, -2], [5, -1, 2], [5, 1, -2], [5, 1, 2], [5, 2, -1], [5, 2, 1], [8, -2, -2], [8, -2, 2], [8, 2, -2], ...

%p L:=[];

%p M:=30;

%p for i from -M to M do

%p for j from -M to M do

%p L:=[op(L),[i^2+j^2,i,j]]; od: od:

%p t6:= sort(L,proc(a,b) evalb(a[1]<=b[1]); end);

%p t6x:=[seq(t6[i][2],i=1..100)]; # A283307

%p t6y:=[seq(t6[i][3],i=1..100)]; # A283308

%o (PARI) rs(t)=round(sqrt(abs(t)));pt(t)=print1(rs(t)*sign(t),", ");for(r2=0,26,xm=rs(r2);for(x=-xm,xm,y2=r2-x^2;if(issquare(y2),if(y2==0,pt(0),pt(-y2);pt(y2))))) \\ _Hugo Pfoertner_, Jun 18 2018

%Y For the x coordinates see A283307.

%Y Cf. A004018, A228108, A283303, A283304, A283305, A283306, A305575, A305576.

%K sign

%O 1,11

%A _N. J. A. Sloane_, Mar 04 2017, following a suggestion from _Ahmet Arduç_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 30 12:09 EDT 2024. Contains 374743 sequences. (Running on oeis4.)