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 A283303 #25 Jul 09 2025 04:42:41 %S A283303 0,1,1,2,2,2,3,3,3,4,4,3,4,4,5,5,5,4,5,6,6,6,5,6,7,5,7,6,7,7,6,8,7,8, %T A283303 8,6,8,7,8,9,9,7,9,8,9,9,7,8,10,10,10,9,10,8,10,9,11,11,10,11,8,9,11, %U A283303 10,11,12,9,12,11,12,10,12,11,12,9,10,12,13,11,13,13,13,12,10,11,13,12,13,14 %N A283303 List points (x,y) having integer coordinates with x >= y >= 0, sorted first by x^2+y^2 and in case of a tie, by x-coordinate. Sequence gives x-coordinates. %H A283303 Hugo Pfoertner, <a href="/A283303/b283303.txt">Table of n, a(n) for n = 1..10000</a> %e A283303 The first few points (listing [x^2+y^2,x,y]) are: %e A283303 [0, 0, 0], [1, 1, 0], [2, 1, 1], [4, 2, 0], [5, 2, 1], [8, 2, 2], [9, 3, 0], [10, 3, 1], [13, 3, 2], [16, 4, 0], [17, 4, 1], [18, 3, 3], [20, 4, 2], [25, 4, 3], [25, 5, 0], [26, 5, 1], [29, 5, 2], [32, 4, 4], [34, 5, 3], [36, 6, 0], [37, 6, 1], [40, 6, 2], [41, 5, 4], [45, 6, 3], [49, 7, 0], ... %p A283303 L:=[]; %p A283303 M:=30; %p A283303 for i from 0 to M do %p A283303 for j from 0 to i do %p A283303 L:=[op(L),[i^2+j^2,i,j]]; od: od: %p A283303 t3:= sort(L,proc(a,b) evalb(a[1]<=b[1]); end); %p A283303 t3x:=[seq(t3[i][2],i=1..100)]; # A283303 %p A283303 t3y:=[seq(t3[i][3],i=1..100)]; # A283304 %t A283303 nt = 105; (* number of terms to produce *) %t A283303 S[m_] := S[m] = Table[{x, y}, {y, 0, m}, {x, y, m}] // Flatten[#, 1]& // SortBy[#, {#.#&, #[[1]]&}]& // #[[All, 1]]& // PadRight[#, nt]& %t A283303 S[m = 2]; %t A283303 S[m = 2 m]; %t A283303 While[S[m] =!= S[m/2], m = 2 m]; %t A283303 S[m] (* _Jean-François Alcover_, Mar 05 2023 *) %Y A283303 For the y coordinates see A283304. %Y A283303 See also A283305-A283308. %K A283303 nonn %O A283303 1,4 %A A283303 _N. J. A. Sloane_, Mar 04 2017, following a suggestion from _Ahmet Arduç_