Skip to content
TopicTracker
From johndcook.comView original
TranslationTranslation

Queens on a prime order board

The article explains that for the n queens problem on an n × n board, when n is a prime number ≥ 5, a valid solution can be found by placing queens on a line with slope 2, 3, 4, and so on.

Background

The n queens problem is a classic puzzle: can you place n chess queens on an n×n board so none attack each other? For large n it's non-trivial. This post explains a neat mathematical trick: when n is a prime number (at least 5), there's a simple construction using modular arithmetic that automatically works. John D. Cook is a well-known applied mathematician and blogger who writes about math, computing, and cryptography for a general technical audience. The post assumes familiarity with the queens problem itself and basic modular arithmetic, but the key insight is that prime board sizes unlock a clean algebraic solution, which is a beautiful example of number theory meeting combinatorial puzzles.

Related stories

  • The article discusses a mathematical problem involving placing queens on a chessboard of prime order so that no two queens attack each other, exploring connections between the n-queens problem and modular arithmetic on prime-sized boards.