Office Applications and Entertaiment, Magic Squares  
Index  About the Author 
17.0 Special Magic Squares, ZigZag
When a Magic Square contains repeated wave type patterns (see below) summing to the Magic Sum s1, it is called a V type ZigZag Magic Square.
17.2 Magic Squares (4 x 4) When the equations defining the horizontal V type ZigZag property for a fourth order Magic Square: a( 1) + a( 6) + a( 3) + a( 8) = s1 a( 5) + a(10) + a( 7) + a(12) = s1 a( 9) + a(14) + a(11) + a(16) = s1 a(13) + a( 2) + a(15) + a( 4) = s1 are added to the equations describing a Simple Magic Square of the fourth order (ref. Section 2.2), the resulting Two Way V type ZigZag Magic Square is described by following set of linear equations: a(11) = s1  a(12)  a(15)  a(16) a( 7) = s1 + a( 8) + 2*a(12) + a(15) + a(16) a( 4) = s1  a( 8)  a(12)  a(16) a( 3) = s1  a( 8)  a(12)  a(15) a(14) = 0.5 * s1  a(16) a(9) = 0.5 * s1  a(11) a(13) = 0.5 * s1  a(15) a(5) = 0.5 * s1  a( 7) a(10) = 0.5 * s1  a(12) a(2) = 0.5 * s1  a( 4) a( 6) = 0.5 * s1  a( 8) a(1) = 0.5 * s1  a( 3)
The consequential symmetry (Column Symmetrical) is worth to be noticed and complies with Dudeney Group 5.
The solutions can be obtained by guessing a(16), a(15), a(12) and a(8) and filling out these guesses in the equations shown above.
17.3 Magic Squares (5 x 5) When the equations defining the horizontal V type ZigZag property for a fifth order Magic Square: a( 1) + a( 7) + a( 3) + a( 9) + a( 5) = s1 a( 6) + a(12) + a( 8) + a(14) + a(10) = s1 a(11) + a(17) + a(13) + a(19) + a(15) = s1 a(16) + a(22) + a(18) + a(24) + a(20) = s1 a(21) + a( 2) + a(23) + a( 4) + a(25) = s1 are added to the equations describing a Simple Magic Square of the fifth order (ref. Section 3.2), the resulting Two Way V type ZigZag Magic Square is described by following set of linear equations: a( 1) = 0.6 * s1  a( 3)  a( 5) a( 2) = 0.4 * s1  a( 4) a( 3) = 2*a(13)  a(23) a( 4) = 2 * s1  a(10) + a(13)  a(14)  a(15)  2 * a(19)  a(20)  a(23)  a(24)  2 * a(25) a( 5) = s1  a(10)  a(15)  a(20)  a(25) a( 6) = 0.6 * s1  a( 8)  a(10) a( 8) = s1  3 * a(13)  a(18) a( 7) = 0.4 * s1  a( 9) a( 9) =  s1 + a(10)  a(13) + a(15) + a(19) + a(20) + a(23) + 2 * a(25) a(12) = 0.4 * s1  a(14) a(11) = 0.6 * s1  a(13)  a(15) a(17) = 0.4 * s1  a(19) a(16) = 0.6 * s1  a(18)  a(20) a(22) = 0.4 * s1  a(24) a(21) = 0.6 * s1  a(23)  a(25)
The consequential symmetry (Columns 2  4) is worth to be noticed and the reason that Two Way V type ZigZag Magic Squares of the fifth order can't be Associated or Pan Magic.
The solutions can be obtained by guessing a(23)  a(25), a(19)  a(20), a(13)  a(15) and a(10) and filling out these guesses in the equations shown above.
17.4 Magic Squares (6 x 6) When the equations defining the horizontal V type ZigZag property for a sixth order Magic Square: a( 1) + a( 8) + a( 3) + a(10) + a( 5) + a(12) = s1 a( 7) + a(14) + a( 9) + a(16) + a(11) + a(18) = s1 a(13) + a(20) + a(15) + a(22) + a(17) + a(24) = s1 a(19) + a(26) + a(21) + a(28) + a(23) + a(30) = s1 a(25) + a(32) + a(27) + a(34) + a(29) + a(36) = s1 a(31) + a( 2) + a(33) + a( 4) + a(35) + a( 6) = s1 are added to the equations describing a Simple Magic Square of the sixth order (ref. Section 6.2), the resulting Two Way V type ZigZag Magic Square is described by following set of linear equations: a(32) = 0.5 * s1  a(34)  a(36) a(31) = 0.5 * s1  a(33)  a(35) a(26) = 0.5 * s1  a(28)  a(30) a(25) = 0.5 * s1  a(27)  a(29) a(20) = 0.5 * s1  a(22)  a(24) a(19) = 0.5 * s1  a(21)  a(23) a(14) = 0.5 * s1  a(16)  a(18) a(13) = 0.5 * s1  a(15)  a(17) a(11) =  s1 + a(12)  a(16) + a(18)  a(21) + a(24) + a(28) + 2*a(30) + a(33) + a(35) + a(36) a( 9) = 3 * s1 + a(10)  2*a(15) + a(16)  a(17)  a(18)  a(22)  a(23)  a(24)  a(27)  a(28) +  2*a(29) + 2*a(30)  2*a(33)  2*a(35)  2*a(36) a( 8) = 0.5 * s1  a(10)  a(12) a( 7) = 0.5 * s1  a( 9)  a(11) a( 6) = s1  a(12)  a(18)  a(24)  a(30)  a(36) a( 5) = s1  a(11)  a(17)  a(23)  a(29)  a(35) a( 4) = s1  a(10)  a(16)  a(22)  a(28)  a(34) a( 3) =  a( 5)  a(10)  a(12) + a(15) + a(22) + a(29) + a(36) a( 2) = 0.5 * s1  a( 4)  a( 6) a( 1) = 0.5 * s1  a( 3)  a( 5)
which require an even Magic Sum s1. Consequently possible solutions can only be found for Non Consecutive Integers.
When, together with the equations defining the horizontal V type ZigZag property, the equations defining the vertical V type ZigZag property for a sixth order Magic Square: a(1) + a( 8) + a(13) + a(20) + a(25) + a(32) = s1 a(2) + a( 9) + a(14) + a(21) + a(26) + a(33) = s1 a(3) + a(10) + a(15) + a(22) + a(27) + a(34) = s1 a(4) + a(11) + a(16) + a(23) + a(28) + a(35) = s1 a(5) + a(12) + a(17) + a(24) + a(29) + a(36) = s1 a(6) + a( 7) + a(18) + a(19) + a(30) + a(31) = s1 are added to the equations describing a Pan Magic Square of the sixth order (ref. Section 6.1), the resulting Four Way V type ZigZag Pan Magic Square can be described  after deduction  by following set of linear equations: a(19) =  s1 / 3 + a(28) + a(33) + a(35) a(20) =  s1 / 3 + a(29) + a(34) + a(36) a(21) = s1 / 6 + a(30)  a(33) a(22) = 2 * s1 / 3  a(27)  a(29)  a(34) a(23) = 2 * s1 / 3  a(28)  a(30)  a(35) a(24) = s1 / 6 + a(27)  a(36) a(25) = s1 / 2  a(27)  a(29) a(26) = s1 / 2  a(28)  a(30) a(31) = s1 / 2  a(33)  a(35) a(32) = s1 / 2  a(34)  a(36)
which illustrate the consequential symmetry (complete).
Four Way V type ZigZag Magic Square of order 6 can be constructed by transformation of Composed Magic Squares
(ref. Section 6.09.8).
A1
Attachment 6.10.8a, Pan Magic Complete Magic Squares, Composed of Anti Symmetric Semi Magic Sub Squares
and will return respectively:
Each suitable set of Anti Symmetric Semi Magic Sub Squares corresponds with
8 * 12^{2} = 1152 Prime Number Four Way V type ZigZag Crosswise Symmetric Magic Squares of order 6.
Each suitable set of Anti Symmetric Semi Magic Sub Squares corresponds with
8 * 12^{2} = 1152 Prime Number Four Way V type ZigZag Associated Magic Squares of order 6.
Although Two and Four Way V type ZigZag Simple Magic Squares of order 7 do exist, following sections are limited to seventh order Ultra and Associated Magic Squares.
When the equations defining the horizontal V type ZigZag property for a seventh order Magic Square: a( 1) + a( 9) + a( 3) + a(11) + a( 5) + a(13) + a( 7) = s1 a( 8) + a(16) + a(10) + a(18) + a(12) + a(20) + a(14) = s1 a(15) + a(23) + a(17) + a(25) + a(19) + a(27) + a(21) = s1 a(22) + a(30) + a(24) + a(32) + a(26) + a(34) + a(28) = s1 a(29) + a(37) + a(31) + a(39) + a(33) + a(41) + a(35) = s1 a(36) + a(44) + a(38) + a(46) + a(40) + a(48) + a(42) = s1 a(43) + a( 2) + a(45) + a( 4) + a(47) + a( 6) + a(49) = s1 are added to the equations describing an Ultra Magic Square of the seventh order (ref. Section 7.3), the resulting Two Way V type ZigZag Ultra Magic Square is described by following set of linear equations: a(44) = 3*s1/7  a(46)  a(48) a(43) = 4*s1/7  a(45)  a(47)  a(49) a(38) = s1/7  a(40) + a(45)  a(46) + a(47) a(37) = 3*s1/7  a(39)  a(41) a(36) = 3*s1/7  a(42)  a(45) + a(46)  a(47) a(35) = 6*s1/7  a(41)  a(42)  a(47)  a(48)  a(49) a(34) = 12*s1/7  a(39)  a(40)  2 * a(41)  a(42) + a(45)  2 * a(46)  a(47)  3 * a(48)  a(49) a(33) = 10*s1/7  a(39)  2 * a(40)  a(41) + a(45)  2 * a(46)  a(47)  2 * a(48)  a(49) a(32) = 2*s1/7  a(45) + a(46)  a(47) a(31) = 5*s1/7 + 2 * a(40) + a(41)  2 * a(45) + 2 * a(46) + 2 * a(48) + a(49) a(30) =11*s1/7 + a(39) + a(40) + 2 * a(41) + a(42) + a(46) + 2 * a(47) + 3 * a(48) + a(49) a(29) = s1 + a(39) + a(41) + a(42) + a(45) + 2 * a(47) + a(48) + a(49) a(28) = 5*s1/7 + a(39) + 2 * a(41)  a(45) + a(46) + a(47) + 2 * a(48) a(27) =16*s1/7 + a(39) + 2 * a(40) + 2 * a(41) + 2 * a(42)  a(45) + 2*a(46) + 3*a(47) + 4*a(48) + 2*a(49) a(26) =13*s1/7 + a(39) + 2 * a(40) + 2 * a(41)  a(45) + 3 * a(46) + a(47) + 4 * a(48) + 2*a(49) a(25) = s1/7
The solutions can be obtained by guessing a(49) ... a(45) and a(42) ... a(39) and filling out these guesses in the equations shown above.
It can be proven that seventh order Four Way V type ZigZag Ultra Magic Square don't exist.
17.6 Magic Squares (8 x 8)
17.6.1 Double Order Method, General
Magic Squares of order 8 can be constructed by means of the Double Order method as introduced by L.S. Frierson (1910).
to construct Magic Squares of order 2n, based on Magic Squares of order n, as follows:
A numerical example is shown below:
The resulting 8 x 8 Magic Square is Four Way V type ZigZag and for the example shown above Pan Magic and Complete.
17.6.2 Double Order Method, Pan Magic Base Square A
The Pan Magic Squares A can be selected from Attachment 1 (384 ea) as deducted and discussed in Section 2.1.
as none of these squares can be obtained by means of rotation, reflection, row or column shift performed on one of the others.
17.6.3 Double Order Method, Associated Base Square A
When 48 ea unique Associated Magic Squares A are selected from Attachment 2.5  as deducted and discussed Section 2.3 –
384 Four Way V type ZigZag Magic Squares are returned, while applying the eight different 2 x 2 Sub Squares.
17.6.4 Medjig Method, Pan Magic Base Square A
In Section 8.3.3 the Medjig Method has been used to construct Pan Magic Complete Squares of order 8.
A numerical example is shown below: 
A (4 x 4)
12 13 3 6 7 2 16 9 14 11 5 4 1 8 10 15 Medjig Square B (4 x 4)
3 2 1 0 2 3 0 1 1 0 3 2 0 1 2 3 2 3 0 1 3 2 1 0 0 1 2 3 1 0 3 2 1 0 3 2 0 1 2 3 3 2 1 0 2 3 0 1 0 1 2 3 1 0 3 2 2 3 0 1 3 2 1 0 C (8 x 8)
60 44 29 13 35 51 6 22 28 12 61 45 3 19 38 54 39 55 2 18 64 48 25 9 7 23 34 50 32 16 57 41 30 14 59 43 5 21 36 52 62 46 27 11 37 53 4 20 1 17 40 56 26 10 63 47 33 49 8 24 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
17.6.5 Medjig Method, Associated Base Square A
In Section 8.3.4 the Medjig Method has been used to construct Associated Magic Squares of order 8.
A numerical example is shown below: 
A (4 x 4)
16 9 5 4 3 6 10 15 2 7 11 14 13 12 8 1 Medjig Square B (4 x 4)
3 2 3 2 0 1 0 1 1 0 1 0 2 3 2 3 0 1 0 1 3 2 3 2 2 3 2 3 1 0 1 0 3 2 3 2 0 1 0 1 1 0 1 0 2 3 2 3 0 1 0 1 3 2 3 2 2 3 2 3 1 0 1 0 C (8 x 8)
64 48 57 41 5 21 4 20 32 16 25 9 37 53 36 52 3 19 6 22 58 42 63 47 35 51 38 54 26 10 31 15 50 34 55 39 11 27 14 30 18 2 23 7 43 59 46 62 13 29 12 28 56 40 49 33 45 61 44 60 24 8 17 1
Associated Four Way V type ZigZag Medjig Squares can be generated with procedure Quat867z which:
When the equations defining the horizontal and vertical V type ZigZag property for an eighth order Magic Square, as listed in Section 17.6.7 below, are added to the equations describing an Ultra Magic Square (ref. Section 8.6.2), the resulting Two Way V type ZigZag Ultra Magic Square is defined by following set of linear equations: a(58) = 0.5 * s1  a(60)  a(62)  a(64) a(57) = 0.5 * s1  a(59)  a(61)  a(63) a(48) = 0.5 * s1  a(55)  a(62)  a(64) a(45) = 0.5 * s1  a(54)  a(61)  a(63) a(43) = 0.5 * s1 + 2 * a(54) + a(56)  a(59) + a(61) + 2 * a(63) a(38) = 0.5 * s1 + a(54) + a(56) + a(61) + 2 * a(63) a(34) = 0.5 * s1  a(54)  a(56) + a(59)  a(61)  a(63) a(42) =  s1 + a(53) + 2 * a(55) + a(60) + 3 * a(62) + 2 * a(64) a(39) = 0.5 * s1 + a(53) + a(55) + 2 * a(62) + a(64) a(35) = s1  a(53)  a(55)  a(60)  2 * a(62)  2 * a(64) a(50) = 0.5 * s1  a(52)  a(54)  a(56) a(47) = s1  a(52)  2 * a(54)  2 * a(56) + a(59)  a(61)  2 * a(63) a(41) = 0.5 * s1 + a(52) + a(54) + a(56) + a(61) + a(63) a(40) = a(52) + a(54)  a(59) a(36) = 0.5 * s1  a(52)  a(54)  a(63) a(49) = 0.5 * s1  a(51)  a(53)  a(55) a(46) = s1 + a(51)  a(53)  a(55)  a(60)  3 * a(62)  2 * a(64) a(44) =  a(51) + a(62) + a(64) a(37) =  a(51)  a(53) + a(60) + a(62) + a(64) a(33) = a(51) + a(53)  a(62)
The solutions can be obtained by guessing a(64) ... a(59) and a(56) ... a(51) and filling out these guesses in the equations shown above.
The 136244 Essential Different Bimagic Squares of order eight, as published by Walter Trump and Francis Gaspalou (April 2014), can be stored in a database (Bimagic8).
s(1) = a( 1) + a(10) + a( 3) + a(12) + a( 5) + a(14) + a( 7) + a(16) s(2) = a( 9) + a(18) + a(11) + a(20) + a(13) + a(22) + a(15) + a(24) s(3) = a(17) + a(26) + a(19) + a(28) + a(21) + a(30) + a(23) + a(32) s(4) = a(25) + a(34) + a(27) + a(36) + a(29) + a(38) + a(31) + a(40) s(5) = a(33) + a(42) + a(35) + a(44) + a(37) + a(46) + a(39) + a(48) s(6) = a(41) + a(50) + a(43) + a(52) + a(45) + a(54) + a(47) + a(56) s(7) = a(49) + a(58) + a(51) + a(60) + a(53) + a(62) + a(55) + a(64) s(8) = a(57) + a( 2) + a(59) + a( 4) + a(61) + a( 6) + a(63) + a( 8)
are incorporated in a Query (ReadDb8z2) in order to find Bimagic Squares with the specified property, 756 Two Way V type ZigZag Bimagic Squares of order 8 can be found.
s( 9) = a(1) + a(10) + a(17) + a(26) + a(33) + a(42) + a(49) + a(58) s(10) = a(2) + a(11) + a(18) + a(27) + a(34) + a(43) + a(50) + a(59) s(11) = a(3) + a(12) + a(19) + a(28) + a(35) + a(44) + a(51) + a(60) s(12) = a(4) + a(13) + a(20) + a(29) + a(36) + a(45) + a(52) + a(61) s(13) = a(5) + a(14) + a(21) + a(30) + a(37) + a(46) + a(53) + a(62) s(14) = a(6) + a(15) + a(22) + a(31) + a(38) + a(47) + a(54) + a(63) s(15) = a(7) + a(16) + a(23) + a(32) + a(39) + a(48) + a(55) + a(64) s(16) = a(8) + a( 9) + a(24) + a(25) + a(40) + a(41) + a(56) + a(57)
are added to this Query no results will be returned. So the collection does not contain Four Way V type ZigZag Bimagic Squares.
17.6.8 Transformation of Composed Magic Squares
Four Way V type ZigZag Magic Squares of order 8 can be constructed by transformation of Composed Magic Squares
(ref. Section 22.1).
If the 4 Sub Squares of Square A are Pan Magic,
the resulting Square B will be Pan Magic, Complete and 4 x 4 Compact.
17.7 Magic Squares (9 x 9)
Associated Magic Squares of order 9 with Square Inlays of Order 4 and 5  as deducted and discussed in
Section 9.7.4  are Four Way V type ZigZag.
17.8 Magic Squares (11 x 11)
Associated Magic Squares of order 11 with Square Inlays of Order 5 and 6  as deducted and discussed in
Section 11.3.1  are Four Way V type ZigZag.
The obtained results regarding the miscellaneous types of ZigZag Magic Squares as deducted and discussed in previous sections are summarized in following table: 
Order
Characteristics
Subroutine
Results
4
Two Way V ZigZag
5
Two Way V ZigZag
6
Two Way V ZigZag,
Rect. Compact, Row Symmetric, Pan MagicFour Way V ZigZag, Pan Magic, Complete
7
Two Way V ZigZag, Ultra Magic
Four Way V ZigZag, Associated, Inlaid
8
Four Way V ZigZag, Pan Magic, Complete
8
Four Way V ZigZag, Pan Magic, Complete
Four Way V ZigZag, Associated
8
Four Way V ZigZag, Bimagic
Four Way V ZigZag, Bimagic, Associated
8
Four Way V ZigZag, Associated, Pan Magic
9
Four Way V ZigZag, Associated, Inlaid
11
Four Way V ZigZag, Associated, Inlaid
Comparable routines as listed above, can be used to generate Lozenge Squares, which will be described in following sections.

Index  About the Author 