PUZZLE IBM-322
Prime number magic square
IBM Research · Ponder This · 2025-02
IBM Ponder This #322 · February 2025
Given a number
-
The sum of each row, column, and diagonal is
. -
The number appearing in each row (left-to-right), column (top-down), and diagonals (top left to bottom right and top right to bottom left) is an
-digit prime number (no leading zeros).
Note that the same digit can appear multiple times in the square, and the same prime number can appear multiple times in the square.
The cost of a square is computed in the following manner: We list all the prime numbers appearing in the rows, columns, and diagonals of the square. We remove any duplicates from the list.
For each digit
For example, for
1 7 7 7
5 5 5 7
9 3 9 1
7 7 1 7
in which
5 7 9 1
1 7 7 7
7 5 3 7
9 3 3 7
which has a cost of 143.
Your goal: For
A bonus "*" will be given for finding squares of minimal and maximal costs for
Solution
Best opened after a real attemptTo be added.