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.
This is a valid solution to the given parameters:
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.