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-7 of 7 results.

A276783 a(n) = A275901(n) + A275902(n).

Original entry on oeis.org

0, 3, 4, 6, 7, 13, 14, 16, 17, 18, 19, 22, 23, 29, 30, 33, 34, 39, 40, 42, 43, 44, 45, 48, 49, 53, 55, 58, 59, 61, 62, 64, 67, 68, 71, 76, 77, 80, 81, 84, 85, 88, 89, 92, 93, 94, 95, 100, 102, 105, 107, 110, 112, 113, 115, 118, 119, 121, 122, 124, 126, 127, 131, 134, 135, 137, 138, 142, 143, 146, 147, 152, 154, 157, 158, 160, 161, 163, 165, 166, 168, 171
Offset: 0

Views

Author

N. J. A. Sloane, Oct 03 2016

Keywords

Comments

Specifies which diagonals the queens in A275901 and A275902 lie on.

Crossrefs

Equals A276324 - 1.

Programs

  • Maple
    # To get 10000 terms of A275902 (xx), A275901 (yy), A276783 (ss), -A276325 (dd)
    M1:=100000; M2:=22000; M3:=10000;
    xx:=Array(0..M1,0); yy:=Array(0..M1,0); ss:=Array(0..M1,0); dd:=Array(0..M1,0);
    xx[0]:=0; yy[0]:=0; ss[0]:=0; dd[0]:=0;
    for n from 1 to M2 do
    sw:=-1;
       for s from ss[n-1]+1 to M2 do
          for i from 0 to s do
             x:=s-i; y:=i;
             if not member(x,xx,'p') and
                not member(y,yy,'p') and
                not member(x-y,dd,'p') then sw:=1; break; fi;
          od:  # od i
    if sw=1 then break; fi;
       od: # od s
      if sw=-1 then lprint("error, n=",n); break; fi;
    xx[n]:=x; yy[n]:=y; ss[n]:=x+y; dd[n]:=x-y;
    od: # od n
    [seq(xx[i],i=0..M3)]:
    [seq(yy[i],i=0..M3)]:
    [seq(ss[i],i=0..M3)]:
    [seq(dd[i],i=0..M3)]:

A275902 Following the successive antidiagonals in A275895, let the n-th queen appear in square (x(n),y(n)); sequence gives y(n).

Original entry on oeis.org

0, 2, 1, 4, 3, 8, 5, 10, 7, 6, 12, 14, 9, 18, 11, 13, 21, 24, 15, 26, 17, 16, 28, 30, 19, 20, 34, 36, 22, 38, 23, 40, 25, 27, 44, 47, 29, 31, 50, 52, 32, 33, 55, 57, 35, 37, 59, 62, 39, 65, 41, 42, 69, 43, 71, 73, 45, 75, 46, 77, 49, 48, 81, 83, 51, 85, 53, 88, 54, 56, 91, 58, 95, 97, 60, 99, 61, 101
Offset: 0

Views

Author

N. J. A. Sloane, Aug 24 2016

Keywords

Comments

See A275901 for x(n).
This is a permutation of the nonnegative numbers.
This assumes the indexing starts at 0. See A275899, A275900 if the indexing begins at 1.

Crossrefs

Programs

  • Maple
    See A275899.
    # Alternative Maple program from N. J. A. Sloane, Oct 03 2016
    # To get 10000 terms of A275902 (xx), A275901 (yy), A276783 (ss), -A276325 (dd)
    M1:=100000; M2:=22000; M3:=10000;
    xx:=Array(0..M1,0); yy:=Array(0..M1,0); ss:=Array(0..M1,0); dd:=Array(0..M1,0);
    xx[0]:=0; yy[0]:=0; ss[0]:=0; dd[0]:=0;
    for n from 1 to M2 do
    sw:=-1;
       for s from ss[n-1]+1 to M2 do
          for i from 0 to s do
             x:=s-i; y:=i;
             if not member(x,xx,'p') and
                not member(y,yy,'p') and
                not member(x-y,dd,'p') then sw:=1; break; fi;
          od:  # od i
    if sw=1 then break; fi;
       od: # od s
      if sw=-1 then lprint("error, n=",n); break; fi;
    xx[n]:=x; yy[n]:=y; ss[n]:=x+y; dd[n]:=x-y;
    od: # od n
    [seq(xx[i],i=0..M3)]:
    [seq(yy[i],i=0..M3)]:
    [seq(ss[i],i=0..M3)]:
    [seq(dd[i],i=0..M3)]:

A276325 Diagonal indices of Greedy Queens (see A065188).

Original entry on oeis.org

0, -1, 2, -2, 1, -3, 4, -4, 3, 6, -5, -6, 5, -7, 8, 7, -8, -9, 10, -10, 9, 12, -11, -12, 11, 13, -13, -14, 15, -15, 16, -16, 17, 14, -17, -18, 19, 18, -19, -20, 21, 22, -21, -22, 23, 20, -23, -24, 24, -25, 25, 26, -26, 27, -27, -28, 29, -29, 30, -30, 28, 31
Offset: 1

Views

Author

Alois P. Heinz, Aug 30 2016

Keywords

Comments

a(n) is the index of the diagonal of the n-th queen. The main diagonal has index 0, upper (lower) diagonals have positive (negative) indices.

Examples

			The first queen is in the main diagonal, the second queen is in the first lower diagonal, the third queen is in the second upper diagonal, ... :
:
:  Q\\\\ ...
:  \\\Q\ ...
:  \Q\\\ ...
:  \\\\Q ...
:  \\Q\\ ...
:  \\\\\ ...
:  .....
		

Crossrefs

Programs

  • Maple
    # Maple program from N. J. A. Sloane, Oct 03 2016
    # To get 10000 terms of A275902 (xx), A275901 (yy), A276783 (ss), -A276325 (dd)
    M1:=100000; M2:=22000; M3:=10000;
    xx:=Array(0..M1,0); yy:=Array(0..M1,0); ss:=Array(0..M1,0); dd:=Array(0..M1,0);
    xx[0]:=0; yy[0]:=0; ss[0]:=0; dd[0]:=0;
    for n from 1 to M2 do
    sw:=-1;
       for s from ss[n-1]+1 to M2 do
          for i from 0 to s do
             x:=s-i; y:=i;
             if not member(x,xx,'p') and
                not member(y,yy,'p') and
                not member(x-y,dd,'p') then sw:=1; break; fi;
          od:  # od i
    if sw=1 then break; fi;
       od: # od s
      if sw=-1 then lprint("error, n=",n); break; fi;
    xx[n]:=x; yy[n]:=y; ss[n]:=x+y; dd[n]:=x-y;
    od: # od n
    [seq(xx[i],i=0..M3)]:
    [seq(yy[i],i=0..M3)]:
    [seq(ss[i],i=0..M3)]:
    [seq(dd[i],i=0..M3)]:

Formula

Equals A275901 - A275902.

A326757 a(n) is the X-coordinate of the n-th nonattacking queen placed by a greedy algorithm on N^3 (see Comments for details).

Original entry on oeis.org

0, 0, 2, 1, 1, 0, 4, 0, 4, 2, 1, 3, 0, 5, 0, 6, 2, 1, 3, 4, 7, 3, 5, 0, 6, 2, 1, 3, 1, 3, 7, 6, 9, 1, 5, 6, 4, 1, 3, 2, 9, 2, 1, 8, 11, 3, 1, 4, 13, 12, 8, 0, 4, 2, 7, 9, 1, 14, 2, 6, 8, 4, 0, 3, 12, 8, 10, 2, 4, 12, 5, 18, 3, 7, 0, 9, 4, 2, 10, 8, 3, 5, 7, 0
Offset: 0

Views

Author

Rémy Sigrist and N. J. A. Sloane, Jul 23 2019

Keywords

Comments

We consider an infinite chessboard on N^3 (the first octant of Z^3) traversed by increasing x+y+z and then increasing x+y and then increasing x and place nonattacking queens as soon as possible; these queens can attack along the 13 axes of rotation of a cube.
This sequence is a 3-dimensional variant of A275901.

Examples

			The traversal of N^3 starts:
  X  Y  Z
  -  -  -
  0  0  0
  0  0  1
  0  1  0
  1  0  0
  0  0  2
  0  1  1
  1  0  1
  0  2  0
  1  1  0
  2  0  0
  0  0  3
  0  1  2
  1  0  2
  ...
The first queen is placed at position (0, 0, 0) and attacks every position (m*i, m*j, m*k) with max(i, j, k) = 1 and m > 0.
The second queen is placed at position (0, 1, 2).
		

Crossrefs

See A326758 and A326759 for the Y- and Z- coordinates, respectively.
Cf. A275901.

Programs

  • PARI
    See Links section.

A275899 Following the successive antidiagonals in A065188, let the n-th queen appear in square (x(n),y(n)); sequence gives x(n).

Original entry on oeis.org

1, 2, 4, 3, 5, 6, 10, 7, 11, 13, 8, 9, 15, 12, 20, 21, 14, 16, 26, 17, 27, 29, 18, 19, 31, 34, 22, 23, 38, 24, 40, 25, 43, 42, 28, 30, 49, 50, 32, 33, 54, 56, 35, 36, 59, 58, 37, 39, 64, 41, 67, 69, 44, 71, 45, 46, 75, 47, 77, 48, 78, 80, 51, 52, 85, 53, 86, 55, 90, 91, 57, 95, 60, 61, 99, 62, 101, 63
Offset: 1

Views

Author

N. J. A. Sloane, Aug 24 2016

Keywords

Comments

See A275900 for y(n).
This is a permutation of the natural numbers.
This assumes the indexing starts at 1. See A275901, A275902 if the indexing begins at 0.

Crossrefs

Programs

  • Maple
    # To get the coordinates of queens in order of appearance; b8[] has list of terms of A065188
    M:=7500; c1:=[]; c2:=[];
    t1:=[seq(n+b8[n],n=1..M)];
    t2:=sort(t1);
    for n from 1 to M do
    i:=t2[n]; member(i,t1,'j');
    c1:=[op(c1),j]; c2:=[op(c2),b8[j]];
    od:
    c3:=map(x->x-1,c1):
    c4:=map(x->x-1,c2):
    [seq(c1[n],n=1..80)]; # A275899
    [seq(c2[n],n=1..80)]; # A275900
    [seq(c3[n],n=1..80)]; @ A275901
    [seq(c4[n],n=1..80)]; @ A275902

A275900 Following the successive antidiagonals in A065188, let the n-th queen appear in square (x(n),y(n)); sequence gives y(n).

Original entry on oeis.org

1, 3, 2, 5, 4, 9, 6, 11, 8, 7, 13, 15, 10, 19, 12, 14, 22, 25, 16, 27, 18, 17, 29, 31, 20, 21, 35, 37, 23, 39, 24, 41, 26, 28, 45, 48, 30, 32, 51, 53, 33, 34, 56, 58, 36, 38, 60, 63, 40, 66, 42, 43, 70, 44, 72, 74, 46, 76, 47, 78, 50, 49, 82, 84, 52, 86, 54, 89, 55, 57, 92, 59, 96, 98, 61, 100, 62, 102
Offset: 1

Views

Author

N. J. A. Sloane, Aug 24 2016

Keywords

Comments

See A275899 for x(n).
This is a permutation of the natural numbers.
This assumes the indexing starts at 1. See A275901, A275902 if the indexing begins at 0.

Crossrefs

Programs

A276784 Complement of A276783.

Original entry on oeis.org

1, 2, 5, 8, 9, 10, 11, 12, 15, 20, 21, 24, 25, 26, 27, 28, 31, 32, 35, 36, 37, 38, 41, 46, 47, 50, 51, 52, 54, 56, 57, 60, 63, 65, 66, 69, 70, 72, 73, 74, 75, 78, 79, 82, 83, 86, 87, 90, 91, 96, 97, 98, 99, 101, 103, 104, 106, 108, 109, 111, 114, 116, 117, 120, 123, 125, 128, 129, 130, 132, 133, 136, 139, 140, 141, 144, 145, 148, 149, 150, 151, 153, 155
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2016

Keywords

Crossrefs

Showing 1-7 of 7 results.