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.

A383738 Number of solutions to the n-queens puzzle in a n X n board that are not square root permutations of {n-1,...,2,1,0}.

This page as a plain text file.
%I A383738 #24 May 13 2025 23:36:51
%S A383738 0,0,0,0,8,4,40,92,352,724,2680,14192,73704,365596,2279184,14772448,
%T A383738 95814976,666090624,4968057848,39029188404,314666222008,2691008701644,
%U A383738 24233937684440,227514171970408,2207893435805088,22317699616364044,234907967154122528
%N A383738 Number of solutions to the n-queens puzzle in a n X n board that are not square root permutations of {n-1,...,2,1,0}.
%C A383738 Each solution to the n-queens problem can be represented as a permutation of {0,1,2,...,n-1}.
%C A383738 Conversely, the number of solutions to the n-queens puzzle in a n X n board that are also square root permutations of {n-1,...,2,1,0} is A033148.
%C A383738 a(n) is always even because every solution to the puzzle has its own reflection in the horizontal axis, e.g., {0,2,4,1,3} and {3,1,4,2,0}.
%H A383738 Darío Clavijo, <a href="https://raw.githubusercontent.com/daedalus/MyOEISPrograms/refs/heads/main/A383738.py">Python program</a>, Github.
%H A383738 Mathematics Stack Exchange, <a href="https://math.stackexchange.com/questions/266569/how-to-find-the-square-root-of-a-permutation">How to find the square root of a permutation</a>
%H A383738 Wikipedia, <a href="https://en.wikipedia.org/wiki/Eight_queens_puzzle">Eight queens puzzle</a>
%F A383738 a(n) = A000170(n) - A033148(n).
%e A383738 For n = 5, we have:
%e A383738      0 1 2 3 4      0 1 2 3 4      0 1 2 3 4      0 1 2 3 4      0 1 2 3 4
%e A383738    +-----------+  +-----------+  +-----------+  +-----------+  +-----------+
%e A383738  0 | Q         |  | Q         |  |   Q       |  |   Q       |  |     Q     |
%e A383738  1 |     Q     |  |       Q   |  |       Q   |  |         Q |  | Q         |
%e A383738  2 |         Q |  |   Q       |  | Q         |  |     Q     |  |       Q   |
%e A383738  3 |   Q       |  |         Q |  |     Q     |  | Q      Q  |  |   Q       |
%e A383738  4 |      Q    |  |     Q     |  |         Q |  |           |  |         Q |
%e A383738    +-----------+  +-----------+  +-----------+  +-----------+  +-----------+
%e A383738      0,2,4,1,3      0,3,1,4,2      1,3,0,2,4      1,4,2,0,3      2,0,3,1,4
%e A383738 is sqrt perm: no             no           no            yes              no
%e A383738      0 1 2 3 4      0 1 2 3 4      0 1 2 3 4      0 1 2 3 4      0 1 2 3 4
%e A383738    +-----------+  +-----------+  +-----------+  +-----------+  +-----------+
%e A383738  0 |     Q     |  |       Q   |  |       Q   |  |         Q |  |         Q |
%e A383738  1 |         Q |  | Q         |  |   Q       |  |   Q       |  |     Q     |
%e A383738  2 |   Q       |  |     Q     |  |         Q |  |       Q   |  | Q         |
%e A383738  3 |       Q   |  |         Q |  |     Q     |  | Q         |  |       Q   |
%e A383738  4 | Q         |  |   Q       |  | Q         |  |     Q     |  |   Q       |
%e A383738    +-----------+  +-----------+  +-----------+  +-----------+  +-----------+
%e A383738     2,4,1,3,0      3,0,2,4,1       3,1,4,2,0      4,1,3,0,2      4,2,0,3,1
%e A383738 is sqrt perm: no            yes           no            no              no
%e A383738 In total there are 10 solutions for a 5 X 5 board with 5 queens, of which 8 are not square root permutations of {n-1,...,2,1,0}.
%e A383738 Then, a(5) = 10.
%Y A383738 Cf. A000170, A033148.
%K A383738 nonn
%O A383738 1,5
%A A383738 _Darío Clavijo_, May 07 2025