Thursday 2 October 2014

Magic Squares 4 : Creating a 4x4 magic square using 16 consecutive integers given the sum of a row or a column

Problem Background : A 4x4 magic square is an arrangement of 16 squares arranged in 4 rows and 4 columns. We are given a sum S which is the sum of any row or column. We need to arrange 16 consecutive integers in the square.

Solution : If the sum of a row is S, S also needs to be the sum of any other row or any other column.


Derived corollary : It can be noted that for the numbers in individual squares to be positive integers, S must be of the form 2(mod4) and S must be greater than or equal to 34.

Note that this solution is however only a special case of the general solution:


Observations:
The numbers in individual squares are positive integers when:
  1. S>30d
  2.  If d is even, S is divisible by 4. If d is odd, S is of the form 2(mod4)
The above result can be derived from  Magic Squares 3 :

Thus, S=4a+30d. After this, we merely substitute for a and simplify.

Q.E.D

© Rishabh Bidya

No comments:

Post a Comment