cp's OEIS Frontend

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.

A283306 List points (x,y) having integer coordinates with x >= 0, y >= 0, sorted first by x^2+y^2 and in case of a tie, by x-coordinate. Sequence gives y-coordinates.

This page as a plain text file.
%I A283306 #19 Jul 09 2025 04:43:01
%S A283306 0,1,0,1,2,0,2,1,2,3,0,3,1,3,2,4,0,4,1,3,4,2,5,4,3,0,5,1,5,2,4,5,3,6,
%T A283306 0,6,1,6,2,5,4,6,3,7,0,7,5,1,6,4,7,2,7,3,6,5,8,0,8,7,4,1,8,2,6,8,3,7,
%U A283306 5,8,4,9,0,9,1,9,7,6,2,8,5,9,3,9,4,7,10,8,6,0,10,1,10,2,9,5,10,3,8,7
%N A283306 List points (x,y) having integer coordinates with x >= 0, y >= 0, sorted first by x^2+y^2 and in case of a tie, by x-coordinate. Sequence gives y-coordinates.
%e A283306 The first few points (listing [x^2+y^2,x,y]) are: [0, 0, 0], [1, 0, 1], [1, 1, 0], [2, 1, 1], [4, 0, 2], [4, 2, 0], [5, 1, 2], [5, 2, 1], [8, 2, 2], [9, 0, 3], [9, 3, 0], [10, 1, 3], [10, 3, 1], [13, 2, 3], [13, 3, 2], [16, 0, 4], [16, 4, 0], [17, 1, 4], [17, 4, 1], [18, 3, 3], [20, 2, 4], [20, 4, 2], [25, 0, 5], [25, 3, 4], [25, 4, 3], ...
%p A283306 L:=[];
%p A283306 M:=30;
%p A283306 for i from 0 to M do
%p A283306 for j from 0 to M do
%p A283306 L:=[op(L),[i^2+j^2,i,j]]; od: od:
%p A283306 t4:= sort(L,proc(a,b) evalb(a[1]<=b[1]); end);
%p A283306 t4x:=[seq(t4[i][2],i=1..100)]; # A283305
%p A283306 t4y:=[seq(t4[i][3],i=1..100)]; # A283306
%t A283306 nt = 105; (* number of terms to produce *)
%t A283306 S[m_] := S[m] = Table[{x, y}, {x, 0, m}, {y, 0, m}] // Flatten[#, 1]& // SortBy[#, {#.#&, #[[1]]&}]& // #[[All, 2]]& // PadRight[#, nt]&
%t A283306 S[m = 2];
%t A283306 S[m = 2m];
%t A283306 While[S[m] =!= S[m/2], m = 2m];
%t A283306 S[m] (* _Jean-François Alcover_, Mar 05 2023 *)
%o A283306 (PARI) for(r2=0,113,for(x=0,round(sqrt(r2)),y2=r2-x^2; if(issquare(y2), print1(round(sqrt(y2)),", ")))) \\ _Hugo Pfoertner_, Jun 18 2018
%Y A283306 For the x coordinates see A283305.
%Y A283306 See also A283303, A283304.
%K A283306 nonn
%O A283306 1,5
%A A283306 _N. J. A. Sloane_, Mar 04 2017, following a suggestion from _Ahmet Arduç_