3

The Problem

Take a $5\times 5$ grid and populate it with the numbers $1$ to $25$ such that the sum of all rows, columns, and both main diagonals are equal. Additionally, only even numbers are allowed on the corners

I found the "go up one and right one" method but that does not satisfy the odd even restriction.

Through a simple calculation I know that the sum must be equal to $65$.

Are there any tricks or methods to solve this? Or should I just try out multiple configurations and switch up elements until I arrive at the solution?

Just switching up the elements have helped me arrive here. Everything is satisfied except for the diagonals.

Current Solution Current solution

I can continue with my random method but there must be some kind of trick which makes it easy.

lioness99a
  • 4,943
Aloha
  • 41

1 Answers1

1

You want an associative magic square. The "up one and right obe" method gives you that, but to get a correct associative square you also need to fill the elements in a different order.

Rules for an associative square:

  1. The central element is 13, which is the average of all the elements.

  2. Every pair of elements that has the center as the midpoint should add up to twice this average, meaning 26. For instance, in a solution I derived (which I will not give directly because I expect it to be downvoted and deleted, based on the question history), I have 1 on the far right of the third row. Then on the far left of that row so the 13 in the center is the midpoint, I must render 26-1=25.

With these rules in mind:

Start with the center element 13 and fill in the remaining odd numbers first, bearing in mind that 1 has to be opposite 25, 3 opposite 23, etc, with 13 as the midpoint between these pairs.

Avoid having the middle three elements of columns 2 and 4, and the middle three elements of rows 2 and 4, add up to 39. If the square is to follow the associativity rules, you can't have the remaining two elements add up to 26 in any row or column except the third one that has 13 in the center.

Once you're satisfied with the odd elements, fill in even elements in column 2 that will make it add up to 65, then put even elements in column 4 to satisfy rule 2 and keep the square associative. Do the same with rows 2 and 4.

If all goes well, you should then be able to handle the four corner squares with no further problems. Maybe you'll still need multiple trials, I don't know because on my first attempt following this procedure I succeeded.

Good luck!

Oscar Lanzi
  • 39,403