Office Applications and Entertainment, Magic Squares  
Index  About the Author 
8.3 Medjig Solutions (Main Diagonals, Integers 0, 1, 2 and 3)
As described in section 6.8, for any integer n, a magic square C of order 2n can be constructed from any n x n medjigsquare A with each row, column, and main diagonal summing to 3n,
and any n x n magic square B, by application of the equations:
b_{i} + n^{2} a_{j} with i = 1, 2, ... n^{2} and j = 1, 2, ... 4n^{2}.
The Medjig method of constructing a Magic Square of order 8 is as follows:

B (4 x 4)
b1
b2
b3
b4
b5
b6
b7
b8
b9
b10
b11
b12
b13
b14
b15
b16
Medjig Square A (4 x 4)
a1
a2
a3
a4
a5
a6
a7
a8
a9
a10
a11
a12
a13
a14
a15
a16
a17
a18
a19
a20
a21
a22
a23
a24
a25
a26
a27
a28
a29
a30
a31
a32
a33
a34
a35
a36
a37
a38
a39
a40
a41
a42
a43
a44
a45
a46
a47
a48
a49
a50
a51
a52
a53
a54
a55
a56
a57
a58
a59
a60
a61
a62
a63
a64
Magic Square C (8 x 8)
b1+16*a1
b1+16*a2
b2+16*a3
b2+16*a4
b3+16*a5
b3+16*a6
b4+16*a7
b4+16*a8
b1+16*a9
b1+16*a10
b2+16*a11
b2+16*a12
b3+16*a13
b3+16*a14
b4+16*a15
b4+16*a16
b5+16*a17
b5+16*a18
b6+16*a19
b6+16*a20
b7+16*a21
b7+16*a22
b8+16*a23
b8+16*a24
b5+16*a25
b5+16*a26
b6+16*a27
b6+16*a28
b7+16*a29
b7+16*a30
b8+16*a31
b8+16*a32
b9+16*a33
b9+16*a34
b10+16*a35
b10+16*a36
b11+16*a37
b11+16*a38
b12+16*a39
b12+16*a40
b9+16*a41
b9+16*a42
b10+16*a43
b10+16*a44
b11+16*a45
b11+16*a46
b12+16*a47
b12+16*a48
b13+16*a49
b13+16*a50
b14+16*a51
b14+16*a52
b15+16*a53
b15+16*a54
b16+16*a55
b16+16*a56
b13+16*a57
b13+16*a58
b14+16*a59
b14+16*a60
b15+16*a61
b15+16*a62
b16+16*a63
b16+16*a64
The rows, columns and main diagonals of Square C sum to 2 times the corresponding sum of Magic Square B plus 16 times the corresponding sum of Medjig square A which results in s1 = 2 * 34 + 16 * 12 = 260.

B (4 x 4)
12
13
3
6
7
2
16
9
14
11
5
4
1
8
10
15
Medjig Square A (4 x 4)
1
3
3
0
0
1
1
3
0
2
2
1
3
2
0
2
0
1
2
3
0
3
3
0
3
2
1
0
2
1
2
1
3
0
1
3
2
1
2
0
2
1
0
2
0
3
3
1
2
0
3
2
2
0
0
3
1
3
0
1
3
1
1
2
Magic Square C (8 x 8)
28
60
61
13
3
19
22
54
12
44
45
29
51
35
6
38
7
23
34
50
16
64
57
9
55
39
18
2
48
32
41
25
62
14
27
59
37
21
36
4
46
30
11
43
5
53
52
20
33
1
56
40
42
10
15
63
17
49
8
24
58
26
31
47
Medjig Squares are described by the same set of linear equations as shown in section 8.1.1, for Magic Squares, however with magic sum 12 and following additional equations:
Resulting in the matrix representation:

a(57) = 12  a(58)  a(59)  a(60)  a(61)  a(62)  a(63)  a(64) a(55) = 6  a(56)  a(63)  a(64) a(53) = 6  a(54)  a(61)  a(62) a(51) = 6  a(52)  a(59)  a(60) a(49) = 6  a(50)  a(57)  a(58) a(41) = 12  a(42)  a(43)  a(44)  a(45)  a(46)  a(47)  a(48) a(39) = 6  a(40)  a(47)  a(48) a(37) = 6  a(38)  a(45)  a(46) a(35) = 6  a(36)  a(43)  a(44) a(33) = 6  a(34)  a(41)  a(42) a(25) = 12  a(26)  a(27)  a(28)  a(29)  a(30)  a(31)  a(32) a(23) = 6  a(24)  a(31)  a(32) a(21) = 6  a(22)  a(29)  a(30) a(19) = 6  a(20)  a(27)  a(28) a(17) = 6  a(18)  a(25)  a(26) a(15) = 18 + a(16)  a(22) + a(24)  a(29) + a(32)  a(35)  2 * a(36)  a(39)  2 * a(43)  a(44)  a(47)  a(50) +  a(55)  a(57)  a(63) a(10) = 12  (a(11) + a(12) + a(13) + a(14) + a(15) + a(16) + a(18)  a(20) + a(26)  a(27) + a(34) + (37) + a(42) + + a(46) + a(50) + a(55) + a(58) + a(64))/2 a(9) = 12  a(10)  a(11)  a(12)  a(13)  a(14)  a(15)  a(16) a(8) = 12  a(16)  a(24)  a(32) + a(35) + a(36) + a(39) + a(43) + a(44) + a(47) + a(51) + a(52) + a(55) + a(59) + + a(60) + a(63) a(7) = 18  a(16) + a(22) + a(29) + a(35) + 2*a(36) + 2*a(43) + a(44) + a(50) + a(51) + a(52) + a(57) + a(59) + a(60) a(6) = 12  a(14)  a(22)  a(30)  a(38)  a(46)  a(54)  a(62) a(5) =  6  a(13) + a(22) + a(30) + a(38) + a(46) + a(54) + a(62) a(4) = 12  a(12)  a(20)  a(28)  a(36)  a(44)  a(52)  a(60) a(3) = 6  a(11) + a(20) + a(28)  a(35)  a(43)  a(51)  a(59) a(2) = 12  a(10)  a(18)  a(26)  a(34)  a(42)  a(50)  a(58) a(1) =  6  a( 9) + a(18) + a(26) + a(34) + a(42) + a(50) + a(58)
The linear equations shown above are ready to be solved, for the magic constant 12.
8.3.3 Pan Magic Complete Squares
The Medjig method of constructing a Pan Magic Complete Square of order 8 is as follows:

B (4 x 4)
12 13 3 6 7 2 16 9 14 11 5 4 1 8 10 15 Medjig Square A (4 x 4)
3 2 1 0 3 2 1 0 1 0 3 2 1 0 3 2 2 3 0 1 2 3 0 1 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 2 3 0 1 2 3 0 1 1 0 3 2 1 0 3 2 3 2 1 0 3 2 1 0 Magic Square C (8 x 8)
60 44 29 13 51 35 22 6 28 12 61 45 19 3 54 38 39 55 2 18 48 64 9 25 7 23 34 50 16 32 41 57 14 30 43 59 5 21 36 52 46 62 11 27 37 53 4 20 17 1 56 40 26 10 63 47 49 33 24 8 58 42 31 15
As mentioned in Section 8.7.5, a collection of 640000 Quaternary Pan Magic Complete Squares could be generated with procedure Quat869, which can be considered as Medjig Squares.
8.3.4 Associated Magic Squares
The Medjig method of constructing an Associated Magic Square of order 8 is as follows:

B (4 x 4)
16 9 5 4 3 6 10 15 2 7 11 14 13 12 8 1 Medjig Square A (4 x 4)
3 2 3 2 1 0 1 0 1 0 1 0 3 2 3 2 0 1 0 1 2 3 2 3 2 3 2 3 0 1 0 1 2 3 2 3 0 1 0 1 0 1 0 1 2 3 2 3 1 0 1 0 3 2 3 2 3 2 3 2 1 0 1 0 Magic Square C (8 x 8)
64 48 57 41 21 5 20 4 32 16 25 9 53 37 52 36 3 19 6 22 42 58 47 63 35 51 38 54 10 26 15 31 34 50 39 55 11 27 14 30 2 18 7 23 43 59 46 62 29 13 28 12 56 40 49 33 61 45 60 44 24 8 17 1
As mentioned in Section 8.7.5, a collection of 27752 Quaternary Associated Pan Magic Squares could be generated with procedure Quat867, which can be considered as Medjig Squares.
The linear equations shown in section 8.3.2 above can be applied in an Excel spreadsheet
(Ref. CnstrSngl8e).

Index  About the Author 