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.

Showing 1-6 of 6 results.

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.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

N. J. A. Sloane, Mar 04 2017, following a suggestion from Ahmet Arduç

Keywords

Examples

			The first few points (listing [x^2+y^2,x,y]) are:
[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], ...
		

Crossrefs

For the y coordinates see A283304.
See also A283305-A283308.

Programs

  • Maple
    L:=[];
    M:=30;
    for i from 0 to M do
    for j from 0 to i do
    L:=[op(L),[i^2+j^2,i,j]]; od: od:
    t3:= sort(L,proc(a,b) evalb(a[1]<=b[1]); end);
    t3x:=[seq(t3[i][2],i=1..100)]; # A283303
    t3y:=[seq(t3[i][3],i=1..100)]; # A283304
  • Mathematica
    nt = 105; (* number of terms to produce *)
    S[m_] := S[m] = Table[{x, y}, {y, 0, m}, {x, y, m}] // Flatten[#, 1]& // SortBy[#, {#.#&, #[[1]]&}]& // #[[All, 1]]& // PadRight[#, nt]&
    S[m = 2];
    S[m = 2 m];
    While[S[m] =!= S[m/2], m = 2 m];
    S[m] (* Jean-François Alcover, Mar 05 2023 *)

A283304 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 y-coordinates.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 3, 2, 3, 0, 1, 2, 4, 3, 0, 1, 2, 4, 3, 0, 5, 1, 4, 2, 3, 5, 0, 4, 1, 2, 6, 3, 5, 4, 0, 1, 6, 2, 5, 3, 4, 7, 6, 0, 1, 2, 5, 3, 7, 4, 6, 0, 1, 5, 2, 8, 7, 3, 6, 4, 0, 8, 1, 5, 2, 7, 3, 6, 4, 9, 8, 5, 0, 7, 1, 2, 3, 6, 9, 8, 4, 7, 5, 0, 1, 10, 2, 9, 6, 3, 8, 4, 7, 10, 5
Offset: 1

Views

Author

N. J. A. Sloane, Mar 04 2017, following a suggestion from Ahmet Arduç

Keywords

Examples

			The first few points (listing [x^2+y^2,x,y]) are:
[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], ...
		

Crossrefs

For the x coordinates see A283303.
See also A283305-A283308.

Programs

  • Maple
    L:=[];
    M:=30;
    for i from 0 to M do
    for j from 0 to i do
    L:=[op(L),[i^2+j^2,i,j]]; od: od:
    t3:= sort(L,proc(a,b) evalb(a[1]<=b[1]); end);
    t3x:=[seq(t3[i][2],i=1..100)]; # A283303
    t3y:=[seq(t3[i][3],i=1..100)]; # A283304
  • Mathematica
    nt = 105; (* number of terms to produce *)
    S[m_] := S[m] = Table[{x, y}, {y, 0, m}, {x, y, m}] // Flatten[#, 1]& // SortBy[#, {#.#&, #[[1]]&}]& // #[[All, 2]]& // PadRight[#, nt]&
    S[m = 2];
    S[m = 2 m];
    While[S[m] =!= S[m/2], m = 2 m];
    S[m] (* Jean-François Alcover, Mar 05 2023 *)

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.

Original entry on oeis.org

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, -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, -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
Offset: 1

Views

Author

N. J. A. Sloane, Mar 04 2017, following a suggestion from Ahmet Arduç

Keywords

Examples

			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], ...
		

Crossrefs

For the x coordinates see A283307.

Programs

  • Maple
    L:=[];
    M:=30;
    for i from -M to M do
    for j from -M to M do
    L:=[op(L),[i^2+j^2,i,j]]; od: od:
    t6:= sort(L,proc(a,b) evalb(a[1]<=b[1]); end);
    t6x:=[seq(t6[i][2],i=1..100)]; # A283307
    t6y:=[seq(t6[i][3],i=1..100)]; # A283308
  • 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

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.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

N. J. A. Sloane, Mar 04 2017, following a suggestion from Ahmet Arduç

Keywords

Examples

			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], ...
		

Crossrefs

For the x coordinates see A283305.
See also A283303, A283304.

Programs

  • Maple
    L:=[];
    M:=30;
    for i from 0 to M do
    for j from 0 to M do
    L:=[op(L),[i^2+j^2,i,j]]; od: od:
    t4:= sort(L,proc(a,b) evalb(a[1]<=b[1]); end);
    t4x:=[seq(t4[i][2],i=1..100)]; # A283305
    t4y:=[seq(t4[i][3],i=1..100)]; # A283306
  • 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, 2]]& // 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 *)
  • 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

A283307 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 x-coordinates.

Original entry on oeis.org

0, -1, 0, 0, 1, -1, -1, 1, 1, -2, 0, 0, 2, -2, -2, -1, -1, 1, 1, 2, 2, -2, -2, 2, 2, -3, 0, 0, 3, -3, -3, -1, -1, 1, 1, 3, 3, -3, -3, -2, -2, 2, 2, 3, 3, -4, 0, 0, 4, -4, -4, -1, -1, 1, 1, 4, 4, -3, -3, 3, 3, -4, -4, -2, -2, 2, 2, 4, 4, -5, -4, -4, -3, -3, 0, 0, 3, 3, 4, 4, 5, -5, -5, -1, -1, 1
Offset: 1

Views

Author

N. J. A. Sloane, Mar 04 2017, following a suggestion from Ahmet Arduç

Keywords

Examples

			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], ...
		

Crossrefs

For the y coordinates see A283308.

Programs

  • Maple
    L:=[];
    M:=30;
    for i from -M to M do
    for j from -M to M do
    L:=[op(L),[i^2+j^2,i,j]]; od: od:
    t6:= sort(L,proc(a,b) evalb(a[1]<=b[1]); end);
    t6x:=[seq(t6[i][2],i=1..100)]; # A283307
    t6y:=[seq(t6[i][3],i=1..100)]; # A283308
  • PARI
    pt(t)=print1(t,", ");for(r2=0,26,xm=round(sqrt(r2));for(x=-xm,xm,y2=r2-x^2;if(issquare(y2),if(y2!=0,pt(x));pt(x)))) \\ Hugo Pfoertner, Jun 18 2018

A305260 A linear mapping a(n) = x + y*n of pairs of nonnegative integers (x,y), where the pairs are enumerated first by radial coordinate r and in case of ties, by polar angle 0 <= phi <= Pi/2 in a polar coordinate system.

Original entry on oeis.org

0, 1, 2, 4, 2, 10, 8, 15, 18, 3, 30, 14, 37, 29, 44, 4, 64, 21, 73, 60, 44, 86, 5, 73, 99, 125, 31, 136, 61, 147, 124, 98, 163, 6, 204, 41, 217, 80, 230, 161, 204, 129, 255, 7, 308, 52, 235, 330, 198, 298, 107, 359, 163, 374, 276, 335, 8, 456, 66, 243, 424, 489, 132, 506, 390, 203, 531
Offset: 0

Views

Author

Hugo Pfoertner, Jun 15 2018

Keywords

Comments

Secondary sorting by polar angle is equivalent to secondary sorting by y.
The sequence is an alternative solution to the riddle described in the comments of A304584.

Examples

			   y:
     |
   8 |  57  61  63  66  70
     |
   7 |  44  47  51  53  60  68
     |
   6 |  34  36  38  42  49  55  64
     |
   5 |  25  27  29  32  40  46  54  67
     |
   4 |  16  18  21  24  30  39  48  59  69
     |
   3 |  10  12  14  19  23  31  41  52  65
     |
   2 |   5   7   8  13  20  28  37  50  62
     |
   1 |   2   3   6  11  17  26  35  45  58
     |
   0 |   0   1   4   9  15  22  33  43  56  71
       _______________________________________
  x:     0   1   2   3   4   5   6   7   8   9
.
a(5) = x(5) + 5*y(5) = 0 + 5*2 = 10,
a(14) = x(14) + 14*y(14) = 2 + 14*3 = 44,
a(20) = x(20) + 20*y(20) = 4 + 20*2 = 44.
		

Crossrefs

Programs

  • PARI
    n=-1;for(r2=0,81,for(y=0,round(sqrt(r2)),x2=r2-y^2;if(issquare(x2),print1(round(sqrt(x2))+y*(n++),", "))))
Showing 1-6 of 6 results.