Here we have established definition of construction methods of magic squares and we prove the existence of infinite construction methods of doubly even magic squares.
Functions and Methods of Construction of Magic Squares
1. (), Vol. *, Issue * (20**); L. de O. Miranda, L.B.B.Miranda
Functions and Methods of Construction of Magic
1
Squares
2
Lohans de Oliveira Miranda1
, Lossian Barbosa Bacelar Miranda2
3
1 Unisul University, Brazil
4
2 IFPI, Brazil
5
Correspondence to: Lossian Barbosa Bacelar Miranda, Email: lossianm@gmail.com
6
Abstract: Here we have established definition of construction methods of magic squares and we prove the
7
existence of infinite construction methods of doubly even magic squares.
8
9
Keywords: arithmetic progressions, doubly even magic squares, functions, parity.
10
1 Introduction
11
Here we present definition of construction methods of magic squares. A magic square of order n (or normal
12
magic square) is a square matrix formed by the numbers 1, 2, 3, ..., n2
and such that the sum of the numbers
13
of each row, each column and each of the two diagonals is equal to cn = n3
+n
2 . We call cn of magic constant.
14
The magic square is non-normal when the sum of the numbers in lines, columns and diagonals are all the
15
same, however, not equal to cn
= n3
+n
2 or the set of numbers that form it is not In
= {1, 2, 3, ..., n}. We
16
call the aforementioned sums of totals. If n = 4k, k positive natural number, the magic square is of type
17
doubly even magic square.
18
2 Main results
19
Definition 1 (Auxiliary matrix). Consider the square matrix L = (lij)i,j=1,2,3,...,n
of n = 4k order, k ∈ N∗
,
20
given by
21
22
L =
A B
C D
=
23
24
(2r − 2) n + (2s − 1) n2
− (2r − 2) n − (2s − 1)
n2
− 2rn + (2s − 1) 2rn − (2s − 1)
(2r − 1) n − (2s − 1) n2
− (2r − 1) n + (2s − 1)
n2
− (2r − 1) n − (2s − 1) (2r − 1) n + (2s − 1)
2rn − 2 (s − 1) n2
− 2rn + 2s
n2
− (2r − 2) n − 2 (s − 1) (2r − 2) n + 2s
(2r − 1) n + 2s n
2
− (2r − 1) n − 2 (s − 1)
n2
− (2r − 1) n + 2s (2r − 1) n − 2 (s − 1)
25
26
27
A, B, C and D are square matrices of order n/2, each in blocks of order 2, with r, s ∈ In
4
as follows:
28
1) in A, r grows from top to bottom and, s, grows from left to right; 2) in B, r grows from top to bottom
29
and s grows from right to left; 3) in C, r grows from the bottom up and s, grows from left to right; 4) in
30
D, r grows from the bottom up and s grows from right to left.
31
32
Remark 1. A direct inspection says that: a) The sum of the elements of any column of L is equal to
33
Cn; b) The sum of the elements of any of the first n/2 lines of L is equal to n3
/2; c) The sum of the ele-
34
ments of any of the last n/2 lines of L is equal to Cn + n/2; d) The sum of the elements of main diagonal
35
is n3
/4 + n/2; e) The sum of the elements of secondary diagonal is 3n3
/4 + n/2.
36
37
Proposition 1 (MIRANDA, 2021b). From L can be built
n
2 − 2
n
4
n/2
doubly even magic squares.
38
Proof. Let us, in L, do the following procedures: i) swap l2u−1,2u−1 with l2u,2u−1 and l2u−1,n+2−2u with
39
l2u,n+2−2u when 1 6 u 6
n
4
; ii) swap l2u−1,2u−1 with l2u−2,2u−1 and l2u−1,n+2−2u with l2u−2,n+2−2u when
40
n
4
u 6
n
2
. Note that swaps made with elements from any of the lines are compensated in pairs, so
41
1
2. Functions and Methods of Construction of Magic Squares
that the sum of the elements of the lines remains unchanged. These swaps also do not change the sum
42
of the elements in any column. However, a simple direct calculation shows that the set of swaps adds
43
n3
/4 units to the main diagonal and removes −n3
/4 units from the secondary diagonal. Consequently, the
44
sum of the elements of both diagonals becomes Cn. An inspection on matrices A, B, C and D shows that
45
lv,2t−1 = ln+1−v,2t + 1, lv,2t = ln+1−v,2t−1 + 1; ∀v ∈ In, ∀t ∈ In
2
. This implies that we can transfer n/2 units
46
from the line of v order (v n/2) to the line of n + 1 − v order in
n
2 − 2
n
4
ways, since in just two pairs
47
of adjacent columns we cannot do this transfer due to the aforementioned i-ii procedures. Since there are
48
n/2 pairs of lines and the transfers are independent, then we will have a total of
n
2 − 2
n
4
n/2
possibilities.
49
50
51
Definition 2. Let S = {n1, n2, n3, ...} be a subsequence of N∗
{2}. We call of magic square construction
52
method associated with S to any function f : S → M; ni 7→ Mni
, with M being the set of all magic squares
53
and Mni
a magic square of order ni. We call f : {n1, n2, n3, ..., nk} → M truncation of f in order k. Two
54
methods are the same if the functions that define them are the same.
55
56
Proposition 2. Consider that a successive procedure defined in S = {n1, n2, n3, ...} produces, in inde-
57
pendent ways, g(ni) 0 magic squares for the order ni, ∀i ∈ N∗
. Then: i) can be produced, from this
58
successive procedure, magic squares construction methods associated with S; ii) there are
Qk
i=1 g(ni) trun-
59
cations of these methods in order k; iii) If g(ni) 2 for an infinite amount of i values, there will be infinite
60
magic squares construction methods associated with S.
61
62
Proof. i-ii) To build the first method, choose a magic square for each of the orders (different of 2). The
63
first method will be determined. To build the second method, choose a magic square of order any not yet
64
chosen in the construction of the first method. Then, add to this magic square others, in all orders, not
65
yet chosen in the first method. If for some orders it is not possible to choose new magic squares, repeat the
66
ones already chosen in the first method. This second construction method of magic squares associated with
67
S will be different from the first method. To build the third method, redo the previous procedure by choos-
68
ing magic squares not yet chosen in the methods already built and so on, to build more methods. In this
69
way, all methods will be, two by two, different. As the choices are independent, the fundamental principle
70
of counting can be applied. iii) It is an immediate consequence of the previous item with the hypothesis
71
g(ni) 2.
72
73
Observation 1. The result of Proposition 1 together with the Proposition 2 indicates that the proce-
74
dure that generates
n
2 − 2
n
4
n/2
magic squares for each ni produces infinite construction methods of magic
75
squares.
76
3 Discussion
77
The Proposition 1 makes the doubly even magic squares to be demonstrably abundant among the three main
78
types of magic squares. It should be noted that we do obtain infinite construction methods of doubly even
79
magic squares. The Definition 2 does not change the usual concept of construction method of magic squares
80
that has been known since ancient times. Note that we can combine the various methods known since
81
ancient times to generate infinite other methods. However, these combinations, as a rule, will not generate
82
new squares in addition to those already known. We can also build infinite construction methods of doubly
83
even magic squares using the results obtained in (MIRANDA, 2021a).
84
References
85
[1] HOLGER DANIELSSON. Magische Quadrate, Version 2.03 vom 04.10.2020a. Available on
86
https://www.magic-squares.info/docs/magische-quadrate.pdf. Access on 08/30/2020.
87
2
3. (), Vol. *, Issue * (20**); L. de O. Miranda, L.B.B.Miranda
[2] HOLGER DANIELSSON. Magic Squares, 2020b. Available on https://www.magic-
88
squares.info/en.html. Access on 09/29/2020.
89
[3] MIRANDA, Lohans de O. and MIRANDA, Lossian B. B. Lohans’ Magic Squares and the Gaussian
90
Elimination Method. Journal of Nepal Mathematical Society (JNMS), Volume 3, Issue 1, Year-2020a.
91
[4] MIRANDA, Lohans de O. and MIRANDA, Lossian B. B. Generalization of Durer’s
92
Magic Square and New Methods for Doubly Even Magic Squares, 2020b. Available on
93
https://pt.slideshare.net/lossian/generalization-of-drers-magic-square-and-new-methods-for-doubly-
94
even-magic-squares. Access on 08/29/2020.
95
[5] MIRANDA, Lohans de O. and MIRANDA, Lossian B. B. Cota Inferior para o Número de Quadra-
96
dos Mágicos Advindos dos Duais dos Quadrados Mágicos dos Lohans: Primeiro Aumento, 2020c.
97
Academia.edu. Access on 10/01/ 2020.
98
[6] MIRANDA, Lossian B. B. Existe Magia nos Quadrados Mágicos?, 2020d. Academia.edu. Access on
99
10/01/2020.
100
[7] MIRANDA, Lohans de O. and MIRANDA, Lossian B. B. Estabelecendo In-
101
finitos Métodos de Construção de Quadrados Mágicos, 2020e. Available on
102
https://pyaugohy.blogspot.com/2020/10/estabelecendo-infinitos-metodos-de.html. Access on
103
10/14/2020.
104
[8] MIRANDA, Lohans de O. and MIRANDA, Lossian B. B. Establishing In-
105
finite Methods of Building Magic Squares, 2021a. Available on https :
106
//www.academia.edu/44951501/EstablishingInfiniteM ethodsofConstructionofM agicSquares.
107
Access on 02/22/2021.
108
[9] MIRANDA, Lohans de O. and MIRANDA, Lossian B. B. Sequences of New Methods of Construction
109
of Doubly Even Magic Squares, 2021b. Available on https://www.slideshare.net/lossian/sequences-of-
110
new-methods-of-construction-of-doubly-even-magic-squares. Access on 02/22/2021.
111
3