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.

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

This page as a plain text file.
%I A276783 #5 Oct 03 2016 17:49:37
%S A276783 0,3,4,6,7,13,14,16,17,18,19,22,23,29,30,33,34,39,40,42,43,44,45,48,
%T A276783 49,53,55,58,59,61,62,64,67,68,71,76,77,80,81,84,85,88,89,92,93,94,95,
%U A276783 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
%N A276783 a(n) = A275901(n) + A275902(n).
%C A276783 Specifies which diagonals the queens in A275901 and A275902 lie on.
%p A276783 # To get 10000 terms of A275902 (xx), A275901 (yy), A276783 (ss), -A276325 (dd)
%p A276783 M1:=100000; M2:=22000; M3:=10000;
%p A276783 xx:=Array(0..M1,0); yy:=Array(0..M1,0); ss:=Array(0..M1,0); dd:=Array(0..M1,0);
%p A276783 xx[0]:=0; yy[0]:=0; ss[0]:=0; dd[0]:=0;
%p A276783 for n from 1 to M2 do
%p A276783 sw:=-1;
%p A276783    for s from ss[n-1]+1 to M2 do
%p A276783       for i from 0 to s do
%p A276783          x:=s-i; y:=i;
%p A276783          if not member(x,xx,'p') and
%p A276783             not member(y,yy,'p') and
%p A276783             not member(x-y,dd,'p') then sw:=1; break; fi;
%p A276783       od:  # od i
%p A276783 if sw=1 then break; fi;
%p A276783    od: # od s
%p A276783   if sw=-1 then lprint("error, n=",n); break; fi;
%p A276783 xx[n]:=x; yy[n]:=y; ss[n]:=x+y; dd[n]:=x-y;
%p A276783 od: # od n
%p A276783 [seq(xx[i],i=0..M3)]:
%p A276783 [seq(yy[i],i=0..M3)]:
%p A276783 [seq(ss[i],i=0..M3)]:
%p A276783 [seq(dd[i],i=0..M3)]:
%Y A276783 Cf A275901, A275902, A276325.
%Y A276783 Equals A276324 - 1.
%K A276783 nonn
%O A276783 0,2
%A A276783 _N. J. A. Sloane_, Oct 03 2016