OFFSET
1,6
EXAMPLE
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], ...
MAPLE
MATHEMATICA
nt = 105; (* number of terms to produce *)
S[m_] := S[m] = Table[{x, y}, {x, 0, m}, {y, 0, m}] // Flatten[#, 1]& // SortBy[#, {#.#&, #[[1]]&}]& // #[[All, 1]]& // PadRight[#, nt]&;
S[m = 2];
S[m = 2m];
While[S[m] =!= S[m/2], m = 2m];
S[m] (* Jean-François Alcover, Mar 05 2023 *)
PROG
(PARI) for(r2=0, 113, for(x=0, round(sqrt(r2)), y2=r2-x^2; if(issquare(y2), print1(x, ", ")))) \\ Hugo Pfoertner, Jun 18 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 04 2017, following a suggestion from Ahmet Arduç.
STATUS
approved