%I #79 Mar 07 2020 13:50:20
%S 0,9,13,17,21,82,92,102,112,228,244,260,276,445,467,489,511,630,656,
%T 682,708,967,999,1031,1063,1377,1415,1453,1491,1858,1902,1946,1990,
%U 2411,2461,2511,2561,3037,3093,3149,3205,3734,3796,3858,3920,4239,4305,4371,4437,5056,5128,5200,5272,5946
%N Positions of 1's in A274640: Greedy Queens on a spiral. Equivalently, positions of 0's in A274641.
%C What is the reason for the three "lines" in the graph of first differences (see link, also A275915)?
%C Apparently they are related to the fact that "ones" are concentrated along two main diagonals of the spiral A274640, see the graph "Spiral A274640 with ones shown".
%C This is the Greedy Queens construction on a spiral (cf. A065188). Follow a counterclockwise spiral starting at the origin, and place a queen iff it is not attacked by any existing queen. This same problem is described in a different but equivalent way in A140100 and A140101. See A140101 for a conjectured recurrence which underlies all these sequences. - _N. J. A. Sloane_, Aug 28-30, 2016
%H Alois P. Heinz, <a href="/A273059/b273059.txt">Table of n, a(n) for n = 0..30288</a> (First 101 terms from Zak Seidov)
%H F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, <a href="https://www.combinatorics.org/ojs/index.php/eljc/article/view/v27i1p52/8039">Queens in exile: non-attacking queens on infinite chess boards</a>, Electronic J. Combin., 27:1 (2020), #P1.52.
%H Alois P. Heinz, <a href="/A273059/a273059.txt">Maple program for A273059</a>
%H Alois P. Heinz, <a href="/A273059/a273059.jpg">Positions of first 1409 1's in plane of A274640</a> (Equivalently, positions of first 1409 0's in plane of A274641.)
%H Zak Seidov, <a href="/A273059/a273059.png">Graph of first differences of A273059.</a>
%H Zak Seidov, <a href="/A273059/a273059_1.png">Spiral A274640 with ones shown.</a>
%H N. J. A. Sloane, <a href="/A273059/a273059_2.txt">For each of the first 1409 0's in A274641, list [n, x(n), y(n)].</a>
%F A274640(a(n)) = 1 (this is simply a restatement of the definition).
%p # see link above
%t fx[n_] := fx[n] = If[n == 1, 0, fx[n - 1] + Sin[#*Pi/2]& @ Mod[Floor[Sqrt[ 4*(n - 2) + 1]], 4]];
%t fy[n_] := fy[n] = If[n == 1, 0, fy[n - 1] - Cos[k*Pi/2]& @ Mod[Floor[Sqrt[ 4*(n - 2) + 1]], 4]];
%t b[_, _] = 0;
%t a[n_] := Module[{x, y, s, i, t, m}, {x, y} = {fx[n + 1], fy[n + 1]}; If[b[x, y] > 0, b[x, y], s = {};
%t For[i=1, True, i++, t = b[x+i, y+i]; If[t>0, s = Union[s, {t}], Break[]]];
%t For[i=1, True, i++, t = b[x-i, y-i]; If[t>0, s = Union[s, {t}], Break[]]];
%t For[i=1, True, i++, t = b[x+i, y-i]; If[t>0, s = Union[s, {t}], Break[]]];
%t For[i=1, True, i++, t = b[x-i, y+i]; If[t>0, s = Union[s, {t}], Break[]]];
%t For[i=1, True, i++, t = b[x+i, y]; If[t > 0, s = Union[s, {t}], Break[]]];
%t For[i=1, True, i++, t = b[x-i, y]; If[t > 0, s = Union[s, {t}], Break[]]];
%t For[i=1, True, i++, t = b[x, y+i]; If[t > 0, s = Union[s, {t}], Break[]]];
%t For[i=1, True, i++, t = b[x, y-i]; If[t > 0, s = Union[s, {t}], Break[]]];
%t m = 1; While[MemberQ[s, m], m++]; b[x, y] = m]];
%t Flatten[Position[a /@ Range[0, 10^4], 1]] - 1 (* _Jean-François Alcover_, Feb 25 2020, after _Alois P. Heinz_ *)
%Y Cf. A274640, A065188, A275915 (first differences).
%Y The four spokes are A275916, A275917, A275918, A275919.
%Y A140100 and A140101 describe this same problem in a different way.
%K nonn
%O 0,2
%A _Zak Seidov_, Jul 14 2016
%E Offset changed to 0 by _N. J. A. Sloane_, Aug 31 2016
|