OFFSET
0,2
COMMENTS
What is the reason for the three "lines" in the graph of first differences (see link, also A275915)?
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".
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
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..30288 (First 101 terms from Zak Seidov)
F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, Queens in exile: non-attacking queens on infinite chess boards, Electronic J. Combin., 27:1 (2020), #P1.52.
Alois P. Heinz, Maple program for A273059
Alois P. Heinz, Positions of first 1409 1's in plane of A274640 (Equivalently, positions of first 1409 0's in plane of A274641.)
Zak Seidov, Graph of first differences of A273059.
Zak Seidov, Spiral A274640 with ones shown.
N. J. A. Sloane, For each of the first 1409 0's in A274641, list [n, x(n), y(n)].
FORMULA
A274640(a(n)) = 1 (this is simply a restatement of the definition).
MAPLE
# see link above
MATHEMATICA
fx[n_] := fx[n] = If[n == 1, 0, fx[n - 1] + Sin[#*Pi/2]& @ Mod[Floor[Sqrt[ 4*(n - 2) + 1]], 4]];
fy[n_] := fy[n] = If[n == 1, 0, fy[n - 1] - Cos[k*Pi/2]& @ Mod[Floor[Sqrt[ 4*(n - 2) + 1]], 4]];
b[_, _] = 0;
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 = {};
For[i=1, True, i++, t = b[x+i, y+i]; If[t>0, s = Union[s, {t}], Break[]]];
For[i=1, True, i++, t = b[x-i, y-i]; If[t>0, s = Union[s, {t}], Break[]]];
For[i=1, True, i++, t = b[x+i, y-i]; If[t>0, s = Union[s, {t}], Break[]]];
For[i=1, True, i++, t = b[x-i, y+i]; If[t>0, s = Union[s, {t}], Break[]]];
For[i=1, True, i++, t = b[x+i, y]; If[t > 0, s = Union[s, {t}], Break[]]];
For[i=1, True, i++, t = b[x-i, y]; If[t > 0, s = Union[s, {t}], Break[]]];
For[i=1, True, i++, t = b[x, y+i]; If[t > 0, s = Union[s, {t}], Break[]]];
For[i=1, True, i++, t = b[x, y-i]; If[t > 0, s = Union[s, {t}], Break[]]];
m = 1; While[MemberQ[s, m], m++]; b[x, y] = m]];
Flatten[Position[a /@ Range[0, 10^4], 1]] - 1 (* Jean-François Alcover, Feb 25 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jul 14 2016
EXTENSIONS
Offset changed to 0 by N. J. A. Sloane, Aug 31 2016
STATUS
approved