login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A365437
Number of ways of placing n non-attacking queens on an n X n board, with no three queens in a straight line.
0
1, 1, 0, 0, 2, 0, 0, 0, 8, 32, 40, 96, 410, 1392, 4416, 18752, 71486, 235056, 1001972, 4285920, 21887710, 94619480, 422557444, 2101021824, 11943690634, 61113195600
OFFSET
0,5
REFERENCES
Donald E. Knuth, Constraint Satisfaction (volume 4, fascicle 7a of The Art of Computer Programming, in preparation).
LINKS
Sam Loyd, A Crow Puzzle, in Brooklyn Daily Eagle, 20 December 1896, for the case n=8.
Ho Boon Suan, The n queens problem with no three on a line, MathOverflow, Nov. 2023.
Wikipedia, Eight Queens Puzzle, [Of the twelve fundamental solutions on the 8x8 chessboard, only "Solution 10" satisfies no three in a line. In "Solution 9" the queens on a5, e3 and g2 are in one line. - Vaclav Kotesovec, Nov 08 2023]
EXAMPLE
For n=8, place queens for rows 1..8 into columns 3,6,8,2,4,1,7,5, i.e.,
.
+-----------------+
| . . Q . . . . . |
| . . . . . Q . . |
| . . . . . . . Q |
| . Q . . . . . . |
| . . . Q . . . . |
| Q . . . . . . . |
| . . . . . . Q . |
| . . . . Q . . . |
+-----------------+
.
and rotate and/or reflect to get the other seven ways.
.
(Note that solutions such as
.
+-----------------+
| . . Q . . . . . |
| . . . . . Q . . |
| . . . Q . . . . |
| Q . . . . . . . |
| . . . . . . . Q |
| . . . . Q . . . |
| . . . . . . Q . |
| . Q . . . . . . |
+-----------------+
.
do not count as the queens on rows 4, 6, and 7 are in a straight line.)
CROSSREFS
Sequence in context: A107491 A169775 A329039 * A181502 A223154 A063698
KEYWORD
nonn,more
AUTHOR
Don Knuth, Nov 07 2023
EXTENSIONS
a(21) from Martin Ehrenstein, Nov 08 2023
a(22) from Martin Ehrenstein, Nov 09 2023
a(23) from Martin Ehrenstein, Nov 10 2023
a(24) from Martin Ehrenstein, Nov 16 2023
a(25) from Martin Ehrenstein, May 02 2024
STATUS
approved

  NODES
Community 1
Intern 1
Note 1
os 2
text 2
web 1