7
$\begingroup$

Find a 4 x 4 magic square of positive integers such that any two of its entries are pairwise different and relatively prime, i.e., have no common divisor greater than 1.

What is the least that the largest number in such a square can be?

$\endgroup$
  • $\begingroup$ What is “pairwise different”? $\endgroup$ – Arvasu Kulkarni Feb 10 at 14:56
  • $\begingroup$ @ArvasuKulkarni: Any two entries are different. They are also relatively prime, that is, they do not have a common divisor greater than 1. $\endgroup$ – Bernardo Recamán Santos Feb 10 at 14:59
  • $\begingroup$ Was this puzzle of your own creation? $\endgroup$ – Brandon_J Feb 10 at 20:51
  • $\begingroup$ @Brandon_J: An oldie twisted. $\endgroup$ – Bernardo Recamán Santos Feb 10 at 21:54
  • 1
    $\begingroup$ Wow, that's the best puzzle I ever encountered here (and I've been a lurker for more than a year, I think). A question about the definition: can the square contain a 1, i. e. is 1 considered a coprime to any other natural number or not? It commonly is, but not always. $\endgroup$ – kkm Feb 11 at 0:08
3
$\begingroup$

I believe this is optimal (unless I've missed a trick):

  1 13 47 53
 29 59  7 19
 41 11 37 25
 43 31 23 17

Which has

a maximal value of 59 (and a sum of 114)

Note: all values are prime except for 1 and the composite number 25

I also found these two with the same maximum value:

  1 17 37 59
 53 29 23  9
 47 19 43  5
 13 49 11 41
...using primes, 1, 9 and 49 (with a sum of 114);
and
  1 29 47 49
 43 41 37  5
 59 17 31 19
 23 39 11 53
...using primes, 1, 39 and 49 (with a sum of 126)


First I found these two:

 1 11 41 61
47 31 17 19
43 13 53  5
23 59  3 29
 
and
 1 13 47 53
29 59  7 19
61 31 17  5
23 11 43 37
 
both of which have a maximal value of 61 (and a sum of 114)

For these I restricted myself to fifteen odd primes less than 73 and added the number one as the sixteenth value. These two have the smallest maximal value given this additional constraint.

$\endgroup$
  • $\begingroup$ markfarrar.co.uk/msq4x4cm.htm does not like your solution, but I can't find the error. $\endgroup$ – Brandon_J Feb 10 at 22:22
  • $\begingroup$ Ah, the diagonals. Thanks! $\endgroup$ – Brandon_J Feb 10 at 22:25
  • $\begingroup$ The diagonals work, but not whatever else this considers when deciding if it is "perfect" - looking at the results when you give a magic total it seems to want squares and offset 2-by-1s or 1-by-2s and non-main diagonals. $\endgroup$ – Jonathan Allan Feb 10 at 22:35
  • $\begingroup$ Oh dang. Can I give you a +47 or so for finding this answer? $\endgroup$ – Brandon_J Feb 10 at 22:35
  • $\begingroup$ Just found better :p $\endgroup$ – Jonathan Allan Feb 10 at 22:40
3
$\begingroup$

I've got a solution:

and I admit I found it online.

Here it is:

Magic Square

The largest number in it is

73

$\endgroup$
  • $\begingroup$ Maybe we can make a smaller one by using 1 as one of our numbers? $\endgroup$ – Jonathan Allan Feb 10 at 20:56
  • $\begingroup$ I'm not sure. I feel like I found a pretty reliable source @JonathanAllan $\endgroup$ – Brandon_J Feb 10 at 20:56
  • $\begingroup$ I am not doubting Mathworld as a source, but did A. W. Johnson, Jr allow 1 or not? $\endgroup$ – Jonathan Allan Feb 10 at 21:00
  • $\begingroup$ @JonathanAllan ah, I see what you mean. Does the OP allow the number one? I guess I should ask. $\endgroup$ – Brandon_J Feb 10 at 21:04
  • $\begingroup$ 1 is co-prime to all other integers. Note that I asked if we are only allowed positive integers because the same is true of -1. $\endgroup$ – Jonathan Allan Feb 10 at 21:06
1
$\begingroup$

The following magic square

 11  1 53 37
  7 47 29 19
 71 23  3  5
 13 31 17 41

has magic constant

102

and largest number

71

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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