Construct a 5x5 magic square.
1- Numbers from 1 to 21 can be used.
2- Sum should be 55 (Horizontally, Vertically and Diagonally)
3- Any 4 digits from 1 to 21 can be repeated only once.
4- The Numbers placed in center square cannot be repeated.
https://i.stack.imgur.com/d1xkH.png

up vote 10 down vote accepted

This is a valid solution to the given parameters:

enter image description here
The repeated digits are 5, 9, 13, and 17. The number in the center, 11, is not repeated.

How it was constructed:

There is a well-known method of constructing a normal (odd-sized) magic square. First, start with the number 1 in the middle top square. Then, move diagonally up-right, incrementing the number by 1 each time. If you would reach a square that you have visited, instead move down one square. What differs in this construction is that during these downward steps, I also stop incrementing the counter as well. Surprisingly, this continues to keep all of the sums balanced, which gives us the completed grid.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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