International Journal of Conceptions on Computing and Information Technology
Vol. 3, Issue. 2, August 2015; ISSN: 2345 - 9808
The Complete Number of Four Corner Magic Squares
6 by 6
Al-Ashhab, Saleem
Department of Mathematics
Al-Albayt University
Mafraq, Jordan
ahhab@aabu.edu.jo
Abstract In this paper we consider the problem of counting
magic squares 6 by 6. We introduce and study special types of
magic squares of order six. We present the property preserving
transformations. We list the enumerations of the squares, which
were computed using codes based on parallel computing.
Keywords- component; Magic squares; Four corner propery;
parallel computing
A pandiagonal magic square is a magic square such that the
sum of all entries in all broken diagonals equals the magic
constant. For example, we note in table 2 that the sum of the
entries 34, 36, 7, 44, 10, 2, 42 is 175, which is the magic
constant. These entries represent the first right broken
diagonal.
TABLE II.
A NATURAL PANDIAGONAL AND SYMMETRIC MAGIC SQUARE
OF ORDER SEVEN
I.
INTRODUCTION
In this paper we consider the old famous problem of
magic squares. A semi magic square is a square matrix, where
the sum of all entries in each column or row yields the same
number. Some authors call it magic square. This number is
called the magic constant. We call a semi magic square a
magic square if both main diagonals sum up to the magic
constant. A natural magic square of order n is a matrix of size
nn such that its entries consist of all integers from one to n.
The magic constant is in this case
A NATURAL MAGIC SQUARE OF ORDER THREE
8
3
4
1
5
9
6
7
2
21
35
37
12
36
24
19
48
27
30
17
46
32
40
28
25
22
44
45
18
43
33
20
10
47
31
26
14
38
41
23
42
15
29
16
11
49
13
*
*
The combinations, which appear in the columns, rows and
both diagonals of this square, are the only distinct three
element combinations of the numbers from 1 to 9 with sum
15.
II.
34
A pandiagonal and symmetric magic square is called super
magic. A complete Magic square is a pandiagonal square with
some supplementary qualities. For a complete Magic square of
order 4, the sum of the numbers indicated with a *-sign is also
equal to the magic sum
0.5n ( n 2 1) .
TABLE I.
39
*
*
TYPES OF MAGIC SQUARES
A. Definitions
A symmetric magic square is a natural magic square of
order n such that the sum of both elements of each pair of dual
(opposite entries) is equal to
n 2 1.
B. Number of squares
It is well known that we have only eight 3x3 magic squares
(with sum in all directions 15). All these squares have the
number 5 as a middle entry and all these squares can be formed
11 | 4 9
International Journal of Conceptions on Computing and Information Technology
Vol. 2, Issue. 3, March 2014; ISSN: 2345 - 9808
using the following transformations: rotations with angles
90 ,180 ,270
and reflections about the middle column,
middle row and both diagonals of the square.
In the seventeenth century F. Bessy was the first person to
state that the number of the 4x4 magic squares is 880, where
he considered a magic square with all its rotations and
reflections one square. Hire listed later these squares in tables
in the year 1693. Today we can use the computer to check that
there are
880*8 = 7040
magic squares of order four. At the beginning of the twentieth
century these squares were classified theoretically into twelve
classes. One of these classes is the class of pandiagonal magic
squares consisting of 48 squares. It was proven that they are
generated by three basic squares (cf. [1]). In 1973 Schoeppel
found the number of all natural magic squares of order five.
He computed it using an elementary computer. It is
64 826 306 * 32 = 2 202 441 792,
where we multiply by 32 due to the existence of a property
preserving transformations. According to [2] there exists
736 347 893 760
natural nested magic squares of order six. According to [5] the
number of super magic squares of order five is sixteen and
number of super magic squares of order seven is 20 190 684.
The number of complete magic squares of order four is 48,
and the number of complete magic squares of order eight (cf.
[4]) is 368 640. It is well-known that there are pandiagonal
magic squares and symmetric squares of order five. It was
proven that the pandiagonal magic squares are generated
through 144 basic squares. Hence, there are
144 * 200 = 28 800
natural pandiagonal squares of order five. But, there are
neither pandiagonal magic squares nor symmetric squares of
order six. The proof can be found in [3]. The number of
natural magic squares of order six is actually unknown up to
day. In [5] Trump obtained using empirical methods (Monte
Carlo Method) the following interval estimation for this
number
(1.7712 e19, 1.7796 e19)
Do not use hard tabs, and limit use of hard returns to only one
return at the end of a paragraph. Do not add any kind of
pagination anywhere in the paper. Do not number text headsthe template will do that for you.
This concept was introduced by Al-Ashhab for the first time
in [6]. Al-Ashhab studied this type there in some simple cases.
In [6] Al-Ashhab considered the type called nested four corner
magic square with a pandiagonal magic square, where the
inside 4 by 4 square was pandiagonal. In [6] we find an
enumeration of this class of squares. We can find other
enumerations of other classes of squares of this type in the
references [7], [8], [9], [10] and [11]. The study was focused
on squares with centres, which are symmetric, semi symmetric
or have positive determinants. In the following subsection we
illustrate the previous concepts. In this paper we summarize
and present the total enumerations concerning four corner
magic squares.
A. Types of Squares
A four corner magic square is a magic squares of order six
with magic constant 3s such that the equations
a 33 a 34 a 43 a 44 2 s ,
a ii a i ( i 3 ) a ( i 3 ) i a ( i 3 )( i 3 ) 2 s
hold for i=1,2,3. A four corner magic square of order 6 can
be written as
TABLE III.
with a probability of 99%. We give here the number of a
subset of such squares. We define here classes of magic
squares of order six, which satisfy some of the conditions for
both types. In [4] we find an enumeration of some subsets of
pandiagonal squares. In the references [6], , [11] we find
some partial listings for the number of magic squares. In [12]
there is an enumeration of Franklin squares, which are special
magic squares of order 8 by 8.
III.
FOUR CORNER MAGIC SQUARES
Before you begin to format your paper, first write and save
the content as a separate text file. Keep your text and graphic
files separate until after the text has been formatted and styled.
12 | 4 9
A SYMBOLIC FOUR CORNER MAGIC SQUARE
where
A = 2s b t y,
B = b + j + o + t s w,
D = d + g + n + y a p q,
E = 3s a e m w D,
F = 3s f h k p E,
G = 2s + e + w (j + o + p + q + t),
H = e + g + s + w + y j k o p q,
I = a + b + s d g n,
J = 3s a b j o t,
M = 3s f g t y G,
N = 3s h j n q z,
L = f + h + k + p m s,
Q = 2s a b e,
R = a + b + j + o + p + q + t g 2s w,
International Journal of Conceptions on Computing and Information Technology
Vol. 2, Issue. 3, March 2014; ISSN: 2345 - 9808
T = h + j + q+ z d s,V = 2s j o z
Y = p + q + s b e y, Z = 2s p q h.
We see that it has seventeen independent variables, which
are represented by the small letters. Further, we see that
A + p + I + t + q + D = 3s,
R + Z + J + g + h + w = 3s.
That is two broken diagonals sum up to the magic constant. In
this sense we can think about this new type of squares as a
partial type of pandiagonal magic squares 6 by 6.
We call a four corner magic squares such that
a 33 a 44 a 34 a 43 0 ( 0 )
a four corner magic square of order six with negative (positive)
center. This means that the 2 by 2 square in the center has
negative (positive) determinant.
The number of all different possible values for a, b and
e by computing the number of four corner magic squares is
3429. Hence, there are 3429 possible centers of the natural
four corner magic squares. The number of squares with
positive center is 232. Hence, there are 3197 possible centers
of the negative four corner magic squares. Among these
squares there are 153 (res. 306) centers of the four corner
magic squares, which are symmetric (res. semi symmetric).
TABLE IV.
interchange a 32 (res.
a 42 ) with a 35
This means that we compute first the number of all natural
squares satisfying these conditions. We multiply then this
number by sixteen in order to get the number of squares.
C. Semi Pandiagonal Magic Squares
We can generalize the concept of four corner magic square
to the semi pandiagonal magic square. It has the following
structure).
TABLE V.
A SYMBOLIC SEMI PANDIAGONAL MAGIC SQUARE
23
11
13
33
25
19
28
36
18
35
29
17
27
21
22
34
10
16
32
15
20
30
31
14
26
24
12
a 45 )
It is obvious that the center remains unchanged by this
transformation. This means that a square with negative
(positive) center will be transformed into another one of the
same kind. We can use this transformation to reduce the
number of computed natural magic squares. In order to
eliminate the effect of the previous transformations we
compute all natural four corner magic squares for which the
following conditions hold:
a < 2s a b e , a < e < b , p < q.
A NATURAL FOUR CORNER MAGIC SQUARES
(res.
where
A=4s2dfhlnp2q2a+2u+2vxy+2z,
B=ac+d+h+l+n+p+2qs2u2v+x+y 2z,
D=oklh+s+e, E=2some,
F= ma+os+v+z, G=2s u v z,
H = 4s l p r i k x y,
J = s l d+u x+z,
L = dc+l+m+o+p+qs2uv+x+yz,
M = cadhlmnop2q+4s+2u+vxy+z,
N = 3skicuz,
Q=2a+2d+f+h+l+m+n+2qr3s2u2v+x+y2z+e,
R=cd+kmoq+i+u+z,
T=s q p+u+v y,
W=kf+lm+p+r+is+xe,
Y=3s o I n x e.
B. Property preserving transformations
There are seven classical transformations, which take a
magic square into another magic square. These
transformations also preserve the property "four corner
magic". Now, a four corner magic squares can be transformed
by executing the following interchanges simultaneously into
another one of the same kind:
interchange
a12
(res.
a 62 ) with a15
(res.
a 65 )
interchange
a 21
(res.
a 26 ) with a 51
(res.
a 56 )
interchange
a 22
(res.
a 25 ) with a 55
(res.
a 52 )
interchange
a 23
(res.
a 24 ) with a 53
(res.
a 54 )
It is easy to see that each four corner magic is a semi
pandiagonal magic square. Further, the transformations
considered in 2.3 are property preserving for this new type.
13 | 4 9
International Journal of Conceptions on Computing and Information Technology
Vol. 2, Issue. 3, March 2014; ISSN: 2345 - 9808
It is worth mentioning that the two dependent variables in
the frame of center square (E and H) depends only on the
variables in the outer frame. This is helpful by programming
in order to reduce run time. The problem of counting the
natural squares of this type of squares is yet unsolved.
D. Symbolic Computations of the Determinant
It is sometimes of interest to determine the determinant of
the magic square as a square matrix. In the case of the semi
pandiagonal magic squares there are cases when the
determinant is zero. In general the determinant is not zero for
any semi pandiagonal magic square. In case we have all
entries of the frame of outer 4 by 4 center (E, k, l, m, r, H, p, y,
o and e) as the value 0 . 5 s . Then, we can compute using
symbolic calculation software that the determinant is zero. In
fact we can verify that any square of the following type has
this property:
TABLE VI.
sh
sn
12
1615216027
32
22
3185789236
25
14
1832660683
33
22
3175043309
26
15
1945633956
34
20
3051735565
27
17
2262085071
35
20
2980756405
28
17
2302246120
36
18
2779537023
The total number of centers associated with a = 6 is 266. The
total number of the squares is
37 026 787 410.
TABLE IX.
A SYMBOLIC SQUARE WITH ZERO DETERMINANT
24
LIST OF THE NUMBER WITH A=7
Centers
number
Centers
Number
17,, 21
25
3166315394
29
18
2470624085
22,23
19
2435905129
31
20
2835501838
24
12
1541693095
32
20
2788234151
25
12
1551400314
33
18
2593021222
26
15
1961326026
34
18
2600583126
27
15
1974395481
35
16
2384036314
28
18
2459643220
36
16
2371222332
The total number of centers associated with a = 7 is 242. The
total number of the squares is
33 133 901 727.
different four corner magic squares of order six.
TABLE X.
E. Number of Squares
We used computers to count the several types of four corner
magic squares. The used code can be found in [11]. The new
results in this paper are the enumeration of four corner magic
squares having a negative determinant center, which is neither
symmetric nor semi symmetric. Moreover, the value of a is 6,
7 or 8. In other words we consider the all centers such that
a < e < b, 5< a < 9 , 2s a b e > a,
LIST OF THE NUMBER WITH A=8
Centers
number
Centers
number
17,, 21
20
2465251485
30
18
2470624085
22
1113252709
31
18
2423463845
23
1122048623
32
16
2268566290
24
10
1251232894
33
16
2266909718
25
13
1654709301
34
14
1990266216
26
13
1690686138
35
14
2050146640
27
16
2143936362
36
12
1757333606
28
16
2138915042
a*(2s a b e) > b*e .
In the following tables we list the number for squares
associated with such centres:
TABLE VII.
LIST OF THE NUMBER WITH A=6
TABLE VIII.
b
Centers
number
Centers
number
17,, 21
27
3462618732
29
20
2720335487
22,23
22
2877627958
30
20
2835501838
The total number of centers associated with a = 8 is 214. The
total number of the squares is
27 807 342 954.
As summary, we have 2738 centers, which are neither
symmetric nor semi symmetric and have negative determinant.
Based on the data in [6], [7] and in this paper we state: the
number of the squares associated with these centers is
represented in the following list:
TABLE XI.
14 | 4 9
LIST OF THE NUMBER WITH A=1,,16
International Journal of Conceptions on Computing and Information Technology
Vol. 2, Issue. 3, March 2014; ISSN: 2345 - 9808
Centers
number
Centers
number
255
270
38523022675
183
24126017814
40662919383
10
152
17629237298
3
4
279
39628193947
11
121
15244199949
282
40866368479
12
87
11061888729
280
39666915624
13
55
7037768734
266
37157828666
14
33
4328085633
242
33133901727
15
15
2059934349
214
27807342954
16
618706214
finished after 4 years of work. We see that the maximum
number of squares for a fixed center is the number
generated by the semi symmetric center a = 17, b = 20, e =
18 (398369256). Further, the minimum number of squares
for a fixed center is the number generated by the symmetric
center a = 1, b = 35, e = 2 (80012582).
REFERENCES
[1]
When we sum all numbers together we conclude that: the
number of the squares with negative center is
379 552 332 175.
Hence, the total number of the squares with negative center is
379552332175 *16 = 6 072 837 314 800.
IV.
CONCLUSIONS
There are 232 centers of the natural positive determinant four
corner magic squares. According to [9] there are
30 350 772 825 * 16 = 485 612 365 200
There are 153 possible symmetric centers of the natural four
corner magic squares. According to [11] there are
28 634 584 244 * 16 = 458 153 347 904
different natural four corner magic squares with symmetric
center. There are 306 possible semi symmetric centers of the
natural four corner magic squares. According to [10] there are
101 425 060 998 * 16 = 1 622 800 975 968
different natural four corner magic squares with semi
symmetric center. Hence, there are
8 639 404 003 872
different four corner magic squares of order six.
The problem of counting the number of squares of order six
has been now completely solved. Today, the work was
B. Rosser and J. Walker, On the transformation group for diabolic
magic squares of order four, The American Mathematical Society
Bulletin, vol. XLIV, 1938.
[2] J. Bellew, Counting the number of compound and nasik magic
squares, Mathematics Today, 1997, pp. 111118.
[3] http://mathworld.wolfram.com/PanmagicSquare.html
[4] K. Ollerenshaw, D. S. Bre, Most-perfect pandiagonal magic squares:
their construction and enumeration, The Institute of Mathematics And
its Applications, Southend-on-Sea, U.K., 1998.
[5] www.trump.de/magic-squares
[6] S. S. Al-Ashhab, Magic squares 5x5", the international journal of
applied science and computations, vol. 15, no.1, 2008, pp. 5364.
[7] S. S. Al-Ashhab, The number of four corner magic squares of order
six, British Journal of Applied Science & Technology 7(2), Article no.
BJAST. 2015. 132, 2015, pp. 141155.
[8] S. S. Al-Ashhab, Negative four corner magic squares of order six with
a between 1 and 5", Qatar Foundation Annual Research Conference
(ARC 2014 conference), 2014.
[9] S. S. Al-Ashhab, Special magic squares of order six, Research Open
Journal of Information Science and Application, vol. 1, no. 1, 2013, pp.
0119.
[10] S. S. Al-Ashhab, Special magic squares of order six and eight,
International Journal of Digital Information and Wireless
Communications (IJDIWC) 1(4), 2012, pp. 769781.
[11] S. S. Al-Ashhab, Even-order magic Squares with special properties,
International Journal of Open Problems in Mathematics and Computer
Science, vol. 5, no. 2, 2012.
[12] Maya Ahmed, How many squares are there, Mr. Franklin? constructing
and enumerating Franklin squares, American Mathematical Monthly
111, 2004, pp. 394410.
15 | 4 9