5
$\begingroup$

There are 25 primes smaller than 100. What is the closest to a 5 x 5 magic square I can construct with them? By "closest" I mean the one with the most columns, rows, and diagonals (12 in all) adding to the same amount.

$\endgroup$

1 Answer 1

6
$\begingroup$

I'll get things started with

10 lines with common sum 215:

    23 47 31 43 71
    89 41 67 11  7
    13 29 17 97 59
    53 79  2 61  5
    37 19 83  3 73


You can achieve

12 lines with distinct primes, here with common sum 283:

  13 107  79  37  47
  97  19   7  71  89
  29  17 131  23  83
 113   3   5 109  53
  31 137  61  43  11

$\endgroup$
4
  • 7
    $\begingroup$ This is clearly optimal: the row/column containing 2 will have an even sum, all others will have an odd sum. $\endgroup$ Sep 4, 2022 at 17:52
  • 1
    $\begingroup$ Followup: By choosing any 25 primes (not necessarily the 25 smallest), can you achieve 11 or even 12 matching sums? $\endgroup$
    – Ed Murphy
    Sep 5, 2022 at 7:02
  • 1
    $\begingroup$ @EdMurphy I updated my answer to address this. $\endgroup$
    – RobPratt
    Sep 5, 2022 at 16:16
  • $\begingroup$ mathworld.wolfram.com/PrimeMagicSquare.html $\endgroup$ Sep 5, 2022 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.