OFFSET
0,2
COMMENTS
All the permutations A004515 and A065256-A065258 consist of the first fixed term ("Queen on the corner") plus infinitely many 4-cycles and they satisfy the "nonattacking queen condition" that p(i+d) <> p(i)+-d for all i and d >= 1.
The corresponding infinite permutation matrix is a scale-invariant fractal (cf. A048647) and any subarray (5^i) X (5^i) (i >= 1) cut from its corner gives a solution to the case n=5^i of the n nonattacking queens on n X n chessboard (A000170). Is there any permutation of N which would give solutions to the queen problem with more frequent intervals than A000351?
LINKS
MAPLE
[seq(QuintalQueens0Inv(j), j=0..124)];
HalveDigit := (d, b) -> op(2, op(1, msolve(2*x=d, b))); # b should be an odd integer >= 3 and d should be in range [0, b-1].
HalveDigits := proc(n, b) local i; add((b^i)*HalveDigit((floor(n/(b^i)) mod b), b), i=0..floor(evalf(log[b](n+1)))+1); end;
QuintalQueens0Inv := n -> HalveDigits(n, 5);
MATHEMATICA
HalveDigit[d_, b_ /; OddQ[b] && b >= 3] /; 0 <= d <= b - 1 := Module[{x}, x /. Solve[2*x == d, x, Modulus -> b][[1]]];
HalveDigits[n_, b_] := Sum[b^i*HalveDigit[Mod[Floor[n/b^i] , b], b], {i, 0, Floor[Log[b, n + 1]]}];
QuintalQueens0Inv[n_] := HalveDigits[n, 5];
Table[QuintalQueens0Inv[n], {n, 0, 80}] (* Jean-François Alcover, Mar 05 2016, adapted from Maple *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Oct 26 2001
EXTENSIONS
Edited by Charles R Greathouse IV, Nov 01 2009
STATUS
approved