cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A065256 Quintal Queens permutation of N: halve or multiply by 3 (mod 5) each digit (0->0, 1->3, 2->1, 3->4, 4->2) of the base 5 representation of n.

This page as a plain text file.
%I A065256 #15 Mar 05 2016 16:00:14
%S A065256 0,3,1,4,2,15,18,16,19,17,5,8,6,9,7,20,23,21,24,22,10,13,11,14,12,75,
%T A065256 78,76,79,77,90,93,91,94,92,80,83,81,84,82,95,98,96,99,97,85,88,86,89,
%U A065256 87,25,28,26,29,27,40,43,41,44,42,30,33,31,34,32,45,48,46,49,47,35,38
%N A065256 Quintal Queens permutation of N: halve or multiply by 3 (mod 5) each digit (0->0, 1->3, 2->1, 3->4, 4->2) of the base 5 representation of n.
%C A065256 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.
%C A065256 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?
%H A065256 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%p A065256 [seq(QuintalQueens0Inv(j),j=0..124)];
%p A065256 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].
%p A065256 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;
%p A065256 QuintalQueens0Inv := n -> HalveDigits(n,5);
%t A065256 HalveDigit[d_, b_ /; OddQ[b] && b >= 3] /; 0 <= d <= b - 1 := Module[{x}, x /. Solve[2*x == d, x, Modulus -> b][[1]]];
%t A065256 HalveDigits[n_, b_] := Sum[b^i*HalveDigit[Mod[Floor[n/b^i] , b], b], {i, 0, Floor[Log[b, n + 1]]}];
%t A065256 QuintalQueens0Inv[n_] := HalveDigits[n, 5];
%t A065256 Table[QuintalQueens0Inv[n], {n, 0, 80}] (* _Jean-François Alcover_, Mar 05 2016, adapted from Maple *)
%Y A065256 Inverse permutation: A004515. A065256[n] = A065258[n+1]-1. Cf. also A065187, A065189.
%K A065256 nonn,base
%O A065256 0,2
%A A065256 _Antti Karttunen_, Oct 26 2001
%E A065256 Edited by _Charles R Greathouse IV_, Nov 01 2009