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.

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

This page as a plain text file.
%I A275902 #27 Nov 08 2016 20:08:54
%S A275902 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,
%T A275902 34,36,22,38,23,40,25,27,44,47,29,31,50,52,32,33,55,57,35,37,59,62,39,
%U A275902 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
%N A275902 Following the successive antidiagonals in A275895, let the n-th queen appear in square (x(n),y(n)); sequence gives y(n).
%C A275902 See A275901 for x(n).
%C A275902 This is a permutation of the nonnegative numbers.
%C A275902 This assumes the indexing starts at 0. See A275899, A275900 if the indexing begins at 1.
%H A275902 N. J. A. Sloane, <a href="/A275902/b275902.txt">Table of n, a(n) for n = 0..10386</a>
%p A275902 See A275899.
%p A275902 # Alternative Maple program from _N. J. A. Sloane_, Oct 03 2016
%p A275902 # To get 10000 terms of A275902 (xx), A275901 (yy), A276783 (ss), -A276325 (dd)
%p A275902 M1:=100000; M2:=22000; M3:=10000;
%p A275902 xx:=Array(0..M1,0); yy:=Array(0..M1,0); ss:=Array(0..M1,0); dd:=Array(0..M1,0);
%p A275902 xx[0]:=0; yy[0]:=0; ss[0]:=0; dd[0]:=0;
%p A275902 for n from 1 to M2 do
%p A275902 sw:=-1;
%p A275902    for s from ss[n-1]+1 to M2 do
%p A275902       for i from 0 to s do
%p A275902          x:=s-i; y:=i;
%p A275902          if not member(x,xx,'p') and
%p A275902             not member(y,yy,'p') and
%p A275902             not member(x-y,dd,'p') then sw:=1; break; fi;
%p A275902       od:  # od i
%p A275902 if sw=1 then break; fi;
%p A275902    od: # od s
%p A275902   if sw=-1 then lprint("error, n=",n); break; fi;
%p A275902 xx[n]:=x; yy[n]:=y; ss[n]:=x+y; dd[n]:=x-y;
%p A275902 od: # od n
%p A275902 [seq(xx[i],i=0..M3)]:
%p A275902 [seq(yy[i],i=0..M3)]:
%p A275902 [seq(ss[i],i=0..M3)]:
%p A275902 [seq(dd[i],i=0..M3)]:
%Y A275902 Cf. A065188, A275895, A275899, A275900, A275901.
%K A275902 nonn
%O A275902 0,2
%A A275902 _N. J. A. Sloane_, Aug 24 2016