Queens in exile: non-attacking queens on infinite chess boards

Number the cells of a (possibly infinite) chessboard in some way with the numbers 0, 1, 2, ... Consider the cells in order, placing a queen in a cell if and only if it would not attack any earlier queen. The problem is to determine the positions of the queens. We study the problem for a doubly-infinite chessboard of size Z x Z numbered along a square spiral, and an infinite single-quadrant chessboard (of size N x N) numbered along antidiagonals. We give a fairly complete solution in the first case, based on the Tribonacci word. There are connections with combinatorial games.


Queens in exile
The rival queens in the mythical country of Attakía have been quarreling, and have agreed to go into exile. The great plain has been divided into squares, which have been numbered in a square spiral (Figs. 1, 2). The first queen settles at square 0. The next queen proceeds along the square spiral and settles at the first square she reaches from which she cannot attack the first queen: this is square 9. The process is repeated for all the queens. Each queen settles at the first square along the spiral from which she cannot attack any queen who is already settled. The positions of the first nine queens are indicated by circles in Fig. 2. The squares along the spiral where they settle form the sequence 0, 9,13,17,21,82,92,102,112,228,244,260,276,445,467,489, 511, 630, . . .
(A273059 1 in [15]). Figure 3 shows the positions of the first 1409 queens. At this scale one can see that the points lie essentially on four straight lines, and that the configuration has cyclic four-fold symmetry. The main goals of the first part of the paper are to determine the positions of the queens, to establish the cyclic symmetry, and to show that the slopes of the four lines are ±ψ and ±1/ψ, where ψ ≈ 1.8393 is the Tribonacci constant, the real root of x 3 = x 2 + x + 1. These results are established in Sections 2-6.
In Section 2 we first show that the positions of the queens are determined by certain recursively defined quadruples of integers X n , Y n , M n , P n , n 0 (see (2), Tables 1, 2, and Theorem 1). A study of the first differences ∆X n , etc., of the X n , Y n , M n , P n sequences suggests that all four can be defined in terms of a certain three-letter sequence that we call the "theme song", and denote by Θ(a, b, c) (Section 3).
Rather surprisingly, the theme song turns out to be a disguised version of the classic three-letter Tribonacci word T(a, b, c) (see Theorem 2 in Section 4). Section 5 contains a number of properties of the Tribonacci word that will be used later. Some of these properties appear to be new (Theorems 13-17, for example), although it is difficult to be certain because so much has already been published about the Tribonacci word.
In Section 6 we establish our main theorem, Theorem 20, which shows that the rows of the XY M P table are in one-to-one correspondence with the terms of the theme song Θ (or, if we ignore the initial n = 0 term, with the terms of the Tribonacci word T). Corollary 21 establishes some unexpected connections between the X n , Y n , M n , P n sequences and the A n , B n , C n sequences studied in [2,4,8] and in §5. 4. Remark (iv) following Theorem 20 shows that the slopes of the lines containing the queens are as claimed.
the electronic journal of combinatorics 27(1) (2020), #P1.52 The reader may wonder why we use both the theme song Θ(a, b, c) and the Tribonacci word T(a, b, c), when these sequences are so similar. The answer is that we need T(a, b, c) because so much is known about its properties (see Section 5), whereas Θ(a, b, c) is more in tune with the XY M P table, since the lengths 6, 5, 4 of the images θ(a), θ(b), θ(c) (see (6)) match the block structure of the table, as can be seen by comparing (4) and (5) with (7).
In Section 7 we consider the same problem in the setting of combinatorial games. The positions of the queens are the P-positions in a certain game, and so correspond to the 0 entries in the table of Sprague-Grundy values for the game (see Fig. 4 below). Although we have been able to determine the positions of the queens, we have not been able to answer a natural question about the Sprague-Grundy values: are all the rows, columns, and diagonals of Fig. 4 permutations of the nonnegative integers (Conjecture 22)? Similar questions can be asked for chessboards of other shapes. The general setting for the problem is that the cells of the board are numbered in some way with the numbers 0, 1, 2, 3, . . . . We consider the cells in order, placing a chess queen in cell n if and only if it would not attack any earlier queen. The problem is to determine the positions of the queens.
In Section 8 we consider the case of an infinite N × N board (that is, a single-quadrant board), where the squares are numbered along successive antidiagonals, as shown in Table 5. For this version of the problem, the data shows overwhelmingly that the queens lie essentially on two straight lies, of slopes φ and 1/φ, where φ is the golden ratio. It is the electronic journal of combinatorics 27(1) (2020), #P1.52 regrettable that we have not been able to prove this. On the other hand, we have been able to prove that all the rows and columns of the Sprague-Grundy table are permutations of the nonnegative integers (although not that the diagonals are). So for this problem, our results are both weaker and stronger than for the queens-on-a-square-spiral problem.
Much is known about these examples, but there is no space to discuss them here.
There are many open questions.
Historical remarks. To the best of our knowledge, the first mention of any of these queens-in-exile problems was in [15], in October 2001, when Antti Karttunen contributed A065188, a version of the single-quadrant sequence A275895. He called it a "Greedy Queens" sequence (referring to the fact that the queens are placed using the greedy algorithm-no disrespect to the queens was intended). The problem on the Z × Z board stated at the beginning of this article was introduced (using somewhat different language) by Paul D. Hanna in June 2008 when he submitted A140100-A140103 to [15] (these are the X n , Y n , M n , P n sequences), and implicitly stated what is now Theorem 1 below. The Sprague-Grundy values for the single-quadrant version were contributed by Alec Jones in April 2016, in A269526. The connections between the exiled queens problems and combinatorial games were pointed out by Allan C. Wechsler in a comment on A274528. The Sprague-Grundy values for the Z×Z board numbered along a square spiral originated in A274640, contributed in June 2016 by Zak Seidov and Kerry Mitchell. Since then, a large number of other authors (too many to mention here) have added further sequences of this type, or contributed comments, computer programs, additional terms, etc. Very recently, Fokkink and Rust introduced in [9] a two-pile combinatorial game they call Splythoff, where the P-positions are given by the queen positions (X n , Y n ). This is another variant of Wythoff's Nim. It is different from the game we discuss in Section 7, since their piles contain only nonnegative numbers of tokens.
Notation. The ternary Tribonacci word will be denoted by T = t 1 t 2 t 3 · · · , or by T(a, b, c) when we wish to emphasize which three-letter alphabet is being used. ψ = 1.839286755214 . . . is the Tribonacci constant, the real root of x 3 − x 2 − x − 1, and φ is the golden ratio. |S| denotes the cardinality of a set, the length of a word, or the absolute value of a complex number. For a set S, mex(S) is the minimum excluded value, that the electronic journal of combinatorics 27(1) (2020), #P1.52 is, the smallest nonnegative number not in S [10]. For a sequence {s n }, the difference operator is defined by ∆s n := s n+1 − s n . We use a centered dot (·) to indicate concatenation of words (or, rarely, the product of two numbers). Z and N are the integers and nonnegative integers, respectively. For any undefined terms from combinatorial games or combinatorics on words, see [1,10,13].

Queens on a square spiral
In this section we study the problem on a doubly-infinite chessboard. The cells are unit squares centered at the points of a Z × Z grid. We construct a "square spiral" by starting at the central square and proceeding counter-clockwise, moving successively East, North, West, South, East, North, . . . . The cells are numbered 0, 1, 2, 3, . . . (see Fig. 2). The exiled queens are placed according to the rule specified in the opening paragraph of the previous section.
We take the x-axis to point South and the y-axis to point East, as shown in the coordinate axes in Fig. 2. This puts the main line of queens (the queens in cells 0, 9, 82, 228, 445, 630, . . . in the first quadrant, and is also consistent with having the origin for the single-quadrant version of the problem (Section 8) in the top left corner of the board, as in the discussions of the related games Wyt Queens and Wythoff's Nim in [3].
We see that the cyclic group of order 4 generated by (x, y) → (−y, x) preserves the points in each shell.
As Paul Hanna realized in 2008, the positions of the queens in the spiral are determined by certain quadruples of nonnegative integers X n , Y n , M n , P n (n 0), defined by X 0 = Y 0 = M 0 = P 0 = 0 and, for n > 0, where mex denotes "minimum excluded value" as defined above. The initial values of these quadruples are shown in Table 1 (the "XYMP table"), and a more extensive list is given in Table 2   2). Similarly ∆M n 2, ∆Y n 4, ∆P n 6. (In fact ∆Y n is never 4 and ∆P n is never 6, although we will not prove this until Section 6.) Also Y n X n + 1 and P n M n + 2 for n > 0.
Let q n (n 0) denote the (x, y) coordinates of the nth queen in the spiral. We saw in Fig. 2 The following theorem is implicit in Paul Hanna's remarks in A140100-A140103.
Proof. Note that the points (3) lie on shell Y k of the spiral, and this set of four points is preserved by the cyclic group of order 4. We establish (3) by induction on k. The result is true for k = 1. Suppose that the hypothesis holds for k = 0, 1, . . . , n. Call a square "free" if a queen at that square would not attack any existing queen. After q 0 , . . . , q 4n+4 have been placed, a square (x, y) is not free if any of the following hold: • x is equal to ±X i or ±Y i for some 0 i n, • y is equal to ±X i or ±Y i for some 0 i n, • y − x is equal to ±M i or ±P i for some 0 i n, the electronic journal of combinatorics 27(1) (2020), #P1.52 • y + x is equal to ±M i or ±P i for some 0 i n, because (x, y) would then be on the same row, column, or diagonal as one of the existing queens.
When we move along the spiral after placing q 4n+4 , the first square we reach that does not satisfy any of these conditions is (by (2)) (X n+1 , Y n+1 ), which is therefore q 4n+5 . Since 0 < X n+1 < Y n+1 , this lies on edge 1 of shell Y n+1 .
As we continue around the spiral, we next reach edge 2 of the same shell. Since the configuration of existing queens is preserved by the cyclic group, we would have q 4n+6 = (−Y n+1 , X n+1 ), except we must check that this square does not attack the queen q 4n+5 we just placed. However, the line from Similar arguments show that q 4n+7 = (−X n+1 , −Y n+1 ) and q 4n+8 = (Y n+1 , −X n+1 ). Thus (3) holds for k = n + 1.
the electronic journal of combinatorics 27(1) (2020), #P1.52 Table 2: The sequences X n , Y n , M n , P n and their differences, the identification of the rows with the "theme song" Θ(a, b, c) = {t n : n 0}, and the sequences A n , B n , C n .

The Tribonacci word
It was a further surprise to discover that Θ(a, b, c) is itself a lightly disguised version of the classic Tribonacci word. The Tribonacci word T = T(a, b, c) = {t n : n 1} is the fixed point of the Tribonacci morphism T(a, b, c) begins a, b, a, c, a, b, a, a, b, a, c, a, b, a, b, a, c, a, b, a, a, b, a, c, a, . . . .
There is an extensive literature-see for example [2,4,7,8,14,16], as well as the references cited in those papers.
If the prefix aba in these three images is changed to a suffix, α becomes θ; that is, for single letters x, α(x) aba = aba θ(x). So α(x) = aba θ(x)(aba) −1 , and since α and θ are morphisms, α(w) = aba θ(w)(aba) −1 for any word w, that is, We prove (10) by showing that, for all k 0, We use induction on k. The result is certainly true for k = 0 and 1. Suppose it holds for k, and set w = α k (c) in (11). We have and canceling aba from both sides we obtain c α k+1 (c) = θ k+1 (c) c, as required. Letting k → ∞ in (12) completes the proof of (10).
In view of Theorem 2 we define t 0 = c, so that Θ(a, b, c) = {t n : n 0}.

Properties of the Tribonacci word
The Tribonacci word T = {t n : n 1} is an analog for a three-letter alphabet of the even more classic two-letter Fibonacci word (see A003849 for an extensive bibliography). In this section we discuss various properties of T for use later in the paper. Most of the properties are analogs of similar properties of the Fibonacci word.
For E = e 1 e 2 · · · e i any finite string of 0's and 1's, let [E] T be the number n = largest possible Tribonacci number). As is well known (cf. [4]), the canonical representation is uniquely characterized by not containing three consecutive 1's. For integers n 0, let (n) T be this canonical representation for n, written with the least significant digit on the right. For example, 111 and 1000 are both representations of the number 7, but only the latter is canonical. Note that we are distinguishing between [E] T , which is a number, and (n) T , which is a binary string. The notations are combined in the formulas in Theorems 14 and 15.
Lemma 3. Let x, y be binary strings.
Proof. Let z be the canonical Tribonacci representation of the integer Consider obtaining z by applying the following replacement rule repeatedly, until no more replacements can be done: 0111 is replaced by 1000. (If 111 appears as a prefix, treat it as if it were 0111.) Each replacement reduces the number of 1's, so the procedure must eventually halt. For example, if x = 1011011101, then the following transformations take place (underlining highlights the block that is replaced): This normalization procedure transforms every non-canonical binary Tribonacci representation into a canonical one. Now observe that if we carry out the same process starting instead with x0, then the rightmost 0 cannot participate in any of these replacements, and so we end up with z0.
On the other hand, if z is canonical, then so is z0. So if [x0] T = [z0] T , we can obtain z0 by processing the representation of x0 as above. If we perform these replacements, then the last 0 of both representations never participates in a replacement, and so omitting the last 0 gives exactly the same sequence of replacements. Hence Corollary 5. Let e 1 · · · e i be a binary Tribonacci representation for n. Then the quantity [e 1 · · · e i−1 ] T + e i does not depend on the particular representation e 1 · · · e i chosen for n.
Proof. Let E = e 1 · · · e i and F = f 1 · · · f j be two binary Tribonacci representations for n. Without loss of generality, we can assume that one of the representations is canonical. If e i = f j , then by Corollary 4 we get [e 1 · · · e i−1 ] T = [f 1 · · · f j−1 ] T , and hence Otherwise assume that e i = 0 and f j = 1. If F is the canonical representation for n, then in carrying out the normalization procedure to convert E to F (as we did in the proof of Lemma 3), we evidently cannot change E's last bit, so f j = 0, a contradiction. So E must be the canonical representation for n. Now consider carrying out the normalization procedure to convert F to E. To change f j = 1 into the 0 corresponding to e i , the only possibility is that the rightmost four bits of F are 0111 and the rightmost four bits of

The Tribonacci morphism
Using the Tribonacci morphism (8), we define a sequence of finite binary words by T n := τ n (a) for n 0. Then the Tribonacci word is T = lim n→∞ T n .
Proof. An easy induction on n.
The next two lemmas are also easily established by induction: Lemma 8. We have |T n | = T n for n 0. Then for m 3, where denotes disjoint union.
For n 1 let N a (n), N b (n), N c (n) be the number of a's, b's, c's respectively in t 1 · · · t n .
Theorem 12. For n 1 let the Tribonacci representation of n be e 1 e 2 · · · e i . Then Proof. We know from Theorem 11 that t n depends on the Tribonacci representation of n − 1 rather than n, so for this proof we set ν = n − 1. The proof is by induction on ν.
Consider a ν in the range T m ν < T m+1 . We prove the result for N a (n), with the other results being exactly analogous. The base cases are easy.
For the induction step, there are two cases to consider: (a) T m ν < T m + T m−1 and If (a) holds, then write ν = T m + ν with 0 ν < T m−1 , and consider the length-m Tribonacci representations of the numbers from 0 to ν − 1. Using Lemma 10, we see that the length-m representations of the numbers from 0 to T m − 1 start with 0, while the numbers from T m to T m + ν − 1 have representations that start with 10. For these latter numbers, subtracting T m removes a leading 1 from the Tribonacci representation, and using Lemma 7 we see that the Tribonacci representations of the numbers from T m to T m + ν − 1 are those of the numbers from 0 to ν − 1, except for this leading 1. By Theorem 11 it follows that the number of a's in t Tm+1 · · · t Tm+ν is equal to N a (ν ). Hence N a (n) = N a (T m ) + N a (ν ) = T m−1 + N a (ν ) (by Lemma 9) = T m−1 + [e 3 · · · e i−1 ] T + e i (by the induction hypothesis) = [e 1 · · · e i−1 ] T + e i .

Case (b) is similar.
Theorem 13. Let the Tribonacci representation of n − 1 be e 1 · · · e i , the representation of n − 2 be f 1 · · · f j , and the representation of n − 4 be g 1 · · · g k . Then the electronic journal of combinatorics 27(1) (2020), #P1.52 Proof. We prove the result for N a (n), the others being similar. There are three cases, depending on whether (n − 1) T = x0, x01, or x011. If (n − 1) T = x0, then x1 is a representation of n; if (n − 1) T = x01, x10 is a representation of n; and if (n − 1) T = x011, x100 is a representation of n. The result then follows by combining Corollary 5 with Theorem 12 An analogous property to Theorem 13 for the Fibonacci word was established in [6, Section 5].

The indexing sequences
For further terms see Table 2  Proof. We use Theorem 12, which tells us how many a's (resp., b's, c's) occur in a prefix of T of a given length. We prove the result for A n , with the other results being proved analogously. Let us count how many a's there are in a prefix [(n−1) T 0] T . By Theorem 12, there are n − 1 of them. Similarly, Theorem 12 says that there are n a's in the prefix of length [(n − 1) T 1] T . Since we index T starting at position 1, it now follows that the symbol at position 1 + [(n − 1) T 0] must be an a.
We also record some further properties of A n , B n , C n established in [8]. For n 1, we have There are some similarities with (2), and in particular (15) is consistent with equation (41) of Corollary 21 below, although we will not prove this observation is correct until Section 6.
The next three properties are easy consequences of the definitions.
We prove (18), since the same argument will be used later. Since T is the fixed point of τ , T = τ (T). Writing τ (t n ) underneath t n , we see: n : 1 2 3 4 5 6 7 8 9 10 11 12 13 . . . t n :  a b a c a b a a b a c a b . . . τ (t n ) : ab ac ab a ab ac ab ab ac ab a ab ac . . .
Each letter t n in T produces an a in τ (t n ), and this a is at position p, where p equals n plus the total number of a's and b's before t n . This is exactly the assertion (18). Properties (19) and (20) have similar proofs.

Numerical bounds.
Appending a 0 to the Tribonacci representation of a number (as in the formula for A n given in Theorem 14) has about the same effect as multiplying the number by ψ. To get precise estimates we must study the Tribonacci numbers T n themselves. From the theory of linear recurrences we know that if ψ, ψ 2 and ψ 3 := ψ 2 denote the roots of x 3 = x 2 + x + 1 then there are constants c 1 , c 2 , and c 3 := c 2 such that T n = c 1 ψ n + c 2 ψ n 2 + c 3 ψ n 3 , for n 0. Proof. We prove (27), the arguments in the other two cases being similar. We write n in its canonical Tribonacci representation, say n = T e 1 +T e 2 +· · ·+T es , where e 1 > e 2 > · · · > e s . Then [(n) T 0] T = T e 1 +1 + T e 2 +1 + · · · + T es+1 , so We break up this sum into two parts, one where 2 e j 18, and one where e j > 18. From (24), the latter sum is bounded in absolute value by j 19 0.731 · 0.738 j .009. The former sum can be bounded by actually computing it for all n < T 19 = 121415. The minimum is achieved at n = 65915 and is, rounded down, equal to −0.587. The maximum is achieved at n = 78748 and is, rounded up, equal to 0.847. Hence −0.596 < [(n) T 0] T − α 1 n < 0.856.
For use in the proof of Theorem 20 we note that Bounds on the inverse quantities are easier to derive, and we just state the result. Deleting the least significant bit of the Tribonacci representation of n has about the same effect as dividing n by ψ. From Theorem 12 we obtain:

The main theorem
We can now establish our main theorem, Theorem 20, which shows that the rows of the XY M P table are in one-to-one correspondence with the terms of the theme song Θ (or, if we ignore the initial n = 0 term, with the terms of the Tribonacci word T). The bijection can be seen in the second column of Table 2.
Proof. Let A n (n 1) denote the index of the nth occurrence of the letter a in the image τ (c · T(a, b, c)), with similar definitions for B n and C n . Write the terms of τ (c · T(a, b, c)) under the corresponding terms of c · T(a, b, c), as we did in the proof of (18)-(20) above. As in that proof, we observe that each term of c·T(a, b, c) produces an a in the image, only now the initial c produces an extra a at the start, and the a produced by t n ∈ T(a, b, c) is displaced from n + 1 by the number of copies of a and b in T(a, b, c) at or before t n . This implies that A n+1 = n + 1 + N a (n) + N b (n).
So A n = n + N a (n − 1) + N b (n − 1) = A n . Similar arguments show that B n = B n and C n = C n , and so (37) holds.
Lemma 19. Let τ be the morphism τ : a → acab, b → aab, c → ab. Then τ (c · T(a, b, c)) = T(a, b, c) . Proof. There are three parts to the proof. In the first part we show that, for any i 1, if terms 0 through C i − 1 of {∆Y } (that is, the terms until just before the ith occurrence of c = 2 in {∆Y }) agree with terms 0 through C i − 1 of Θ(3, 3, 2), then terms 0 through ψ(C i − 1) of {∆X} agree with terms 0 through ψ(C i − 1) of Θ(2, 1, 1). We form the partial sums of the {∆Y } to get C i terms of {Y }, compute the complement to get a certain number of initial terms of {X}, and take the differences to get the initial terms of {∆X}.
From the first two parts of the proof the induction hypothesis implies that {∆X} agrees with Θ(2, 1, 1) for ψC(i) terms, and {∆M } agrees with Θ(1, 2, 1) for at least the same number of terms. Since  Table 2). The label for row n 0 is determined by the value of the quadruple (∆X n , ∆Y n , ∆M n , ∆P n ): if this is (2, 3, 1, 5) then row n is labeled a, (1, 3, 2, 4) then row n is labeled b, (1, 2, 1, 3) then row n is labeled c.
(ii) Since ∆X n = 2 only in the first case, and ∆M n = 2 only in the second case, we conclude that: row n is labeled a if and only if X n + 1 ∈ {Y }, row n is labeled b if and only if M n + 1 ∈ {P }, and otherwise row n is labeled c. (iii) We can now connect the X n , Y n , M n , P n sequences with the A n , B n , C n sequences.
These formulas can be confirmed by looking at the columns of Table 2.
(v) We can also answer a question left over from Section 2. From Theorem 20, we see that ∆Y n is never 4, and ∆P n is never 6. So there is no run of three consecutive X n all differing by 1, and no run of five consecutive M n all differing by 1.

The Sprague-Grundy values
The queens-in-exile problems can be described in terms of two-person, impartial, combinatorial games. We fix a numbering of the cells (such as along a square spiral, or by antidiagonals). A queen is placed anywhere on the board, and the players take turns, moving the queen to any lower-numbered cell which is a queen's move away. The first player who is unable to move loses. The Sprague-Grundy value of a cell is the "mex" of the electronic journal of combinatorics 27(1) (2020), #P1.52 the values of the cells that are a legal move away [3,10]. The P-positions are the cells with Sprague-Grundy value 0, and are also the locations of the exiled queens. For the Z × Z board numbered along a square spiral, the Sprague-Grundy values are shown in Fig. 4. By construction, the Sprague-Grundy values along any row are distinct, and similarly for any column, and any diagonal of slope ±1. The following conjecture is very plausible but unsolved.
Conjecture 22. Every row, column, and diagonal of slope ±1 in the array of Sprague-Grundy values is a permutation of N.

The single-quadrant board
We have fewer results about the positions of the queens in this version of the problem, so we will start right away with the combinatorial game. This is played on an infinite N × N board where the squares are numbered along successive upward antidiagonals, as shown in Table 5. In the game, a queen is placed anywhere on the board, and the players take turns moving it to a lower-numbered square that is a queen's-move away. As usual the first player unable to move loses. A small portion of the table of Sprague-Grundy values is shown in Table 6, and a color-coded illustration of the top 500 × 500 corner of the table is given in Fig. 5.
The only theorem we have for this version of thev problem is: Theorem 23. Every column and every row of the table of Sprague-Grundy values is a permutation of N.
Proof. (Based on arguments in A269526 given by Rob Pratt, Bob Selcoe, and N.J.A.S. in June 2016.) There can be no repeated terms in any column, row, or diagonal, by construction, so we must just show that there are no missing terms. Consider column c 0.
Since the Sprague-Grundy values are calculated moving upwards along the antidiagonals, a number k will appear in column c unless it is blocked by the presence of a k in an earlier column. But the first c columns contain at most c copies of k, so eventually every k will appear in column c. Consider row r 0, and suppose a number k never appears. There are at most r copies of k in the earlier rows, and these can affect only a bounded portion of row r. Consider a square (r, n), where n 0 is large. If k is not to appear in that cell, there must be a copy of k in the antidiagonal to the South-West. So in the right triangle bounded by row r, column 0, and the antidiagonal through (r, n), there must be at least n + 1 − r copies of k (allowing for the r copies of k in the first r rows). Imagine these k's replaced by chess queens. By construction they are mutually non-attacking. But it is known ([17, Problem 252], or A274616) that on a right triangular half-chessboard of side n, there can be at most 2n/3 + 1 mutually non-attacking queens. Since 2n/3 + 1 < n + 1 − r for large n, a k must eventually appear in that row.
As to the diagonals, although they appear to be permutations, there is no proof.
Conjecture 24. Every diagonal of the table of Sprague-Grundy values is a permutation of N.
The argument using non-attacking queens breaks down here because the diagonal of the half-chessboard contains only half as many squares as the sides. (The antidiagonals are certainly not permutations of N, since they have finite length.) We return to the discussion of the positions of the exiled queens. We observed in 2016 that the first 50000 queens appear to lie almost exactly on two straight lines, of slopes φ and 1/φ, where φ is the golden ratio. Figure 6 shows a plot of the first 10000 queens. This is similar to what we saw in Fig. 3, only now we do not have a proof that the points lie on these lines, nor do we have a proof that the slopes are what they appear to be. Donald Knuth (see Exercise 7.2.2.1-38 in [11]) investigated this question in 2018, although his version of the problem is superficially different. In his problem, the queens are placed column-by-column. A queen is placed in column c 0 in the first square the electronic journal of combinatorics 27(1) (2020), #P1.52 from which it cannot attack any earlier queen. However, it is easy to prove that it makes no difference whether the board is scanned by successive antidiagonals or by successive columns. The same sequence {S c } is obtained in both cases. Knuth has written an efficient program for computing this sequence, and finds that the points are extremely close to the two lines: for c < 10 9 , he finds that The evidence for the next conjecture is therefore overwhelming: Conjecture 25. There are constants 1 , 2 such that This combinatorial game can be described in a different way, which suggests a possible attack on the conjecture. If the queen being moved is located at square (x, y), we represent its position by two piles of tokens, of sizes x and y. The legal moves are to remove any positive number of tokens from one pile, or to remove an equal positive number of tokens from both piles, or to move a positive number of tokens from the y pile to the x pile (the latter move corresponds to moving the queen down the antidiagonal). The first person unable to move loses.
A simpler two-pile game is the classic Wythoff's Nim (also called Wyt Queens) [3,18], which has the same moves except that moving tokens from one pile to another is not the electronic journal of combinatorics 27(1) (2020), #P1.52 allowed. The array of Sprague-Grundy values can be found in [3, First edition, Chap. 3, Table 3], [5], and A004481. The sequence {W c } specifying which rows the queens are in (the analog of {S c }) is A002251: 0, 2, 1, 5,7,3,10,4,13,15,6,18,20,8,23,9,26,28,11,31,12,34, . . . . (53) Wythoff [18] himself showed in 1907 that these points lie on two lines (A000201, A001950): The reason we mention this is that Larsson and Wästlund [12] were able to analyze the two lines of queens in Maharaja Nim, a variant of Wythoff's Nim. Can their method be adapted to our problem? Although the array of Sprague-Grundy values for our problem looks irregular, it appears that the columns eventually become quasi-periodic. Column 1 is 2, 3, 0, 1, 6, 7, 4, . . . (A004482), which is the Nim-sum r ⊕ 2, and has generating function (The conjecture also holds for columns 0 and 1.) If true, this would mean that every column eventually becomes quasi-periodic with period 16, something that we find surprising. No such property seems to hold for the rows of the table. The quasi-periodicity of the Sprague-Grundy values for Wythoff's Nim and certain other combinatorial games was studied by Dress, Flammenkamp, and Pink in [5]. However, it does not seem that Conjecture 26 follows from their work.