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.

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

This page as a plain text file.
%I A275901 #30 Nov 08 2016 20:08:39
%S A275901 0,1,3,2,4,5,9,6,10,12,7,8,14,11,19,20,13,15,25,16,26,28,17,18,30,33,
%T A275901 21,22,37,23,39,24,42,41,27,29,48,49,31,32,53,55,34,35,58,57,36,38,63,
%U A275901 40,66,68,43,70,44,45,74,46,76,47,77,79,50,51,84,52,85,54,89,90,56,94,59,60,98,61,100,62
%N A275901 Following the successive antidiagonals in A275895, let the n-th queen appear in square (x(n),y(n)); sequence gives x(n).
%C A275901 See A275902 for y(n).
%C A275901 This is a permutation of the nonnegative numbers.
%C A275901 This assumes the indexing starts at 0. See A275899, A275900 if the indexing begins at 1.
%H A275901 N. J. A. Sloane, <a href="/A275901/b275901.txt">Table of n, a(n) for n = 0..10386</a>
%p A275901 See A275899.
%p A275901 # Alternative Maple program from _N. J. A. Sloane_, Oct 03 2016
%p A275901 # To get 10000 terms of A275902 (xx), A275901 (yy), A276783 (ss), -A276325 (dd)
%p A275901 M1:=100000; M2:=22000; M3:=10000;
%p A275901 xx:=Array(0..M1,0); yy:=Array(0..M1,0); ss:=Array(0..M1,0); dd:=Array(0..M1,0);
%p A275901 xx[0]:=0; yy[0]:=0; ss[0]:=0; dd[0]:=0;
%p A275901 for n from 1 to M2 do
%p A275901 sw:=-1;
%p A275901    for s from ss[n-1]+1 to M2 do
%p A275901       for i from 0 to s do
%p A275901          x:=s-i; y:=i;
%p A275901          if not member(x,xx,'p') and
%p A275901             not member(y,yy,'p') and
%p A275901             not member(x-y,dd,'p') then sw:=1; break; fi;
%p A275901       od:  # od i
%p A275901 if sw=1 then break; fi;
%p A275901    od: # od s
%p A275901   if sw=-1 then lprint("error, n=",n); break; fi;
%p A275901 xx[n]:=x; yy[n]:=y; ss[n]:=x+y; dd[n]:=x-y;
%p A275901 od: # od n
%p A275901 [seq(xx[i],i=0..M3)]:
%p A275901 [seq(yy[i],i=0..M3)]:
%p A275901 [seq(ss[i],i=0..M3)]:
%p A275901 [seq(dd[i],i=0..M3)]:
%Y A275901 Cf. A065188, A275895, A275899, A275900, A275902.
%K A275901 nonn
%O A275901 0,3
%A A275901 _N. J. A. Sloane_, Aug 24 2016