OFFSET
0,3
COMMENTS
This sequence has essentially the same properties as the main sequence A269526, but now involves the nonnegative integers.
This version is important because of the following comment from Allan C. Wechsler, originally contributed to A269526. - N. J. A. Sloane, Jun 30 2016
Sprague-Grundy (Nim) values for a combinatorial game played with two piles of counters. Legal moves consist of removing any positive number of counters from either pile, or removing the same number from both piles, or moving any positive number of counters from the right pile to the left pile. If the Nim-values (as in Sprague-Grundy theory) are written in an array indexed by the number of counters in the two piles, we obtain this array. - Allan C. Wechsler, Jun 29 2016 [corrected by N. J. A. Sloane, Sep 25 2016]
The same sequence arises if we construct a triangle, by reading from left to right in each row, always choosing the smallest nonnegative number which does not produce a duplicate number in any row or diagonal. - N. J. A. Sloane, Jul 02 2016
It appears that the numbers generally appear for the first time in or near the first few rows. - Omar E. Pol, Jul 03 2016
LINKS
Alois P. Heinz, Antidiagonals n = 0..200, flattened
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.
Rémy Sigrist, Colored illustration of T(n, k) for n = 0..499 and k = 0..499 (where the color is function of T(n, k))
N. J. A. Sloane, Confessions of a Sequence Addict (AofA2017), slides of invited talk given at AofA 2017, Jun 19 2017, Princeton. Mentions this sequence.
EXAMPLE
The corner of the square array begins:
0, 2, 1, 5, 3, 4, 9, 10, 12, 7, 13, 17,
1, 3, 4, 0, 7, 2, 5, 11, 13, 15, 6,
2, 0, 5, 1, 8, 6, 4, 3, 14, 16,
3, 1, 2, 4, 0, 7, 8, 6, 15,
4, 6, 0, 3, 1, 5, 2, 14,
5, 7, 8, 6, 4, 9, 3,
6, 4, 3, 2, 5, 13,
7, 5, 6, 8, 10,
8, 10, 7, 9,
9, 11, 12,
10, 8,
11,
MAPLE
# From N. J. A. Sloane, Jul 30 2018, based on Heinz's program in A269526
A:= proc(n, k) option remember; local m, s;
if n=1 and k=1 then 0
else s:= {seq(A(i, k), i=1..n-1),
seq(A(n, j), j=1..k-1),
seq(A(n-t, k-t), t=1..min(n, k)-1),
seq(A(n+j, k-j), j=1..k-1)};
for m from 0 while m in s do od; m
fi
end:
[seq(seq(A(1+d-k, k), k=1..d), d=1..12)];
MATHEMATICA
A[n_, k_] := A[n, k] = Module[{m, s}, If[n==1 && k==1, 0, s = Join[Table[ A[i, k], {i, 1, n-1}], Table[A[n, j], {j, 1, k-1}], Table[A[n-t, k-t], {t, 1, Min[n, k] - 1}], Table[A[n+j, k-j], {j, 1, k-1}]]; For[m = 0, MemberQ[s, m], m++]; m]];
Table[A[d-k+1, k], {d, 1, 13}, {k, 1, d}] // Flatten (* Jean-François Alcover, May 03 2019, from Maple *)
CROSSREFS
AUTHOR
Omar E. Pol, Jun 29 2016
STATUS
approved