OFFSET
0,2
LINKS
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.
FORMULA
This is a permutation of the nonnegative numbers (see the general proof in A269526).
It appears that the permutation is given by a(0)=0, and, for n >= 1, n = 16t+i (0 <= i <= 15) we have a(16t+i) = 16t + c_i, where [c_0, ..., c_15] = [-1,4,5,2,0,8,3,6,7,12,13,10,11,9,17,14]. - N. J. A. Sloane, Jul 01 2016, based on an email from Bob Selcoe, Jun 29 2016.
Equivalently, it appears that this sequence has g.f. = f/g where
f = 2*t^17 - 3*t^15 + 8*t^14 - 2*t^13 + t^12 - 3*t^11 + t^10 + 5*t^9 + t^8 + 3*t^7 - 5*t^6 + 8*t^5 - 2*t^4 - 3*t^3 + t^2 + 3*t + 1, and g = (1-t)*(1-t^16). - N. J. A. Sloane, Jul 06 2019
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]];
a[n_] := A[n + 1, 3];
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 30 2016
EXTENSIONS
More terms from Alois P. Heinz, Jul 01 2016
STATUS
approved