login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A276325 Diagonal indices of Greedy Queens (see A065188). 6
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
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.
LINKS
FORMULA
Equals A275901 - A275902.
EXAMPLE
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\\ ...
: \\\\\ ...
: .....
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)]:
CROSSREFS
Sequence in context: A286468 A102563 A121496 * A286548 A256134 A091971
KEYWORD
sign
AUTHOR
Alois P. Heinz, Aug 30 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 28 02:17 EDT 2024. Contains 373761 sequences. (Running on oeis4.)