Professional Documents
Culture Documents
if mod of two numbers is equal, then the notation and the position of next series of
difference between the two numbers will be numbers starting from (n+1) may be defined
a multiple of the base. Obviously mod value relative to first number in the series 1 to n
of a number to base n, will be numbers from and not n (i.e. 7 as given in above
0 to (n-1). However, for magic squares we example). So position of the starting point of
the next series of n numbers (i.e. n+1 to 2n) x p a
Thirdly, ≠ ≠ .
is defined in relation to starting point of y q b
previous series (i.e. 1 to n) and let the Lastly, to ensure that each number of the
position of n+1 be ‘a’ squares to the west series (1 to (2n+1), (2n+2) to (4n+2) and so
and ‘b’ squares to the south of 1. In a magic on) lies in a different row and column, a, b,
square of order 7, the position of 25 will p or q should not be a factor of (2n+1). This
then be given by (mod7 (x-3a+3p), mod7 (y- was not in above examples, as 5 and 7
3b+3q)). For 25 to be in the centre of the were prime numbers, but for a square of
square each of mod7 (x-3a+3p) and mod7 order 9, 15, 21 or 25, this could be
(y-3b+3q) should be equal to 4. important.
We make another change here and as we Let us consider the first magic square of
are considering magic squares of odd order, order 5 (on page 1). In this (x, y) is (3, 5),
in place of n, let us now talk of a square of (p, q) is (4, 1) and (a, b) is (4, 2). Let us
order (2n+1). One can easily work out that assume, we have just (x, y) as (3, 5) and (p,
in such a magic square, sum of each row, q) as (4, 1). As n=2, this gives us the
column and diagonal should be equations mod5 (3-2a+8) = mod5 (5-2b+2) =
2
(2n+1)(2n +2n+1). Further, position of the 3 or mod5 (11-2a) = mod9 (7-2b) = 3.
middle number in a square of order (2n+1) Solving 11-2a = 7-2b gives us a=b+2 and
will be given by solutions for (a, b) thus could be (3, 1),
(mod2n+1 (x-na+np), mod2n+1 (y-nb+nq)) (4, 2), (5, 3), (6, 4) or (7, 5). As may be seen
and each of only (a, b) as (4, 2) satisfies the condition
mod2n+1 (x-na+np) and mod2n+1 (y-nb+nq) mod5 (3-2a+8) = mod5 (5-2b+2) = 3 and
should be equal to n+1. hence the solution.
Further, there will have to be some Alternatively, assume we have (x, y) as (3,
limitations on the values of p, q, a and b. 5) and (a, b) as (4, 2). The equations now
First of all, they can be only 1 to 2n (not are mod5 (3-8+2p) = mod5 (5-4+2q) = 3 or
2n+1). Similarly x and y cannot be together mod5 (-5+2p) = mod9 (1+2q) = 5. Solving
(n+1). -5+2p = 1+2q gives us p=q+3 and solutions
for (p, q) thus could be (4, 1), (5, 2), (6, 3),
Secondly, they should satisfy the condition
(7, 4) or (8, 5) and as can be seen only for
that mod2n+1 (x-na+np) = mod2n+1 (y-nb+nq)
(p, q) as (4, 1) each of mod5 (-5+2p) and
= (n+1). ……… (1)
mod9 (1+2q) could be 3.
One can similarly try for squares of order 7 numbers 1, 10, 19, 28, … … in same row
on page 2. While in the first square (x, y) is and hence magic square, with 1 starting
(4, 7), (p, q) is (6, 1) and (a, b) is (6, 2), in from (1,1) and next number i.e. 2 moving
second square we find (x, y) is (5, 4), (p, q) two cells to east and four cells to north i.e.
is (1, 1) and (a, b) is (6, 1). (p, q) as (2, 4), cannot be formed. However,
if we try with (a, b) as (7, 9), we will get a
In the first case, equations are
square, where columns and diagonals will
mod7 (4-3a+3p) = mod7 (7-3b+3q) = 4, while
add up to 369, but not rows as can be seen
in second case they are
from the following.
mod7 (5-3a+3p) = mod7 (4-3a+3p) = 4
15 60 24 69 33 78 42 6 51
One can easily see that in each of these
three cases solution is possible as these
80 44 8 53 17 62 26 71 35