Abstract. Nagarjuna's work is the basic source of Buddhism in China and the synthesis of the previous activities of the Lohans, the Buddha's foremost disciples. Here, we present new methods of construction of magic squares. For each order of type n=4k (k∈N^*) an immense amount of new magic squares are construted. Our approach is based on arithmetic progressions, as used by Nagarjuna in his work Kaksaputa, [1]. Because of this, we believe that it is a continuation of the Lohans' work and we report to them.
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
FOUR-CORNER TRIANGLE ROTATION METHOD AND MAGIC SQUARES FROM THOSE OF THE LOHANS
1. 1
FOUR-CORNER TRIANGLE ROTATION METHOD AND MAGIC
SQUARES FROM THOSE OF THE LOHANS
Lohans de Oliveira Miranda, UNEATLANTICO; Lossian Barbosa Bacelar Miranda, IFPI,
lossianm@gmail.com
Abstract. Nagarjuna's work is the basic source of Buddhism in China and the synthesis of the previous
activities of the Lohans, the Buddha's foremost disciples. Here, we present new methods of
construction of magic squares. For each order of type 𝑛 = 4𝑘 (𝑘 ∈ ℕ∗
) an immense amount of new
magic squares are construted. Our approach is based on arithmetic progressions, as used by
Nagarjuna in his work Kaksaputa, [1]. Because of this, we believe that it is a continuation of the
Lohans' work and we report to them.
1. Preliminaries
A magic square of order 𝑛 (or normal magic square) is a square matrix formed by the
numbers 1, 2, 3, … , n2
and such that the sum of the numbers in each row, each column and each of
the two diagonals is equal to cn =
n3+n
2
. We call cn of magic constant. The magic square is non-
normal when the sums of the numbers in the rows, columns and diagonals are all equal but the set of
numbers that form them is not In2 = {1, 2, 3, … , n2
}. We call the aforementioned sums of totals. If
n = 4k, k positive natural number, the magic square is of type double even order. The magic square
of order 1 is the matrix (1). There are no magic squares of order two. There are eight magic squares
of order 3. The first to be unearthed was the magic square of Lo Shu:
(
4 9 2
3 5 7
8 1 6
). (1)
Lo Shu magic square
from which seven more can be generated by rotations and reflections. It is common to identify them
in a single class and say that they constitute the same magic square. The first records relating to this
magic square are from the year 650 BC, in China. Legends date them back to the year 2200 B.C, [2].
There are methods for constructing magic squares for all orders other than two.
Finding a magic square corresponds to solving for In2 = {1, 2, 3, … , n2
} the linear system
of 2n + 2 equations and n2
variables (2), below.
{
∑ xij
n
j=1
=
n3
+ n
2
∑ xij
n
i=1
=
n3
+ n
2
∑ xii
n
i=1
=
n3
+ n
2
∑ xi(n+1−i)
n
i=1
=
n3
+ n
2
∀i, j ∈ In. (2)
2. 2
The only scientific theory that has ever existed consists of testing all possibilities of permutations of
the set In2 in (2) in the immense quantity (n2)!, performing (2n + 2)(n2)! summations. Magic
squares are part of Number Theory (they are solutions of Diophantine linear systems), of Recreational
Mathematics and also of universal culture, including religions. They have also been significant
mathematical landmarks. Great personalities and famous mathematicians studied them.
2. Magic squares of the Lohans and the four-corner triangle rotation method
As defined in [3], are double even magic squares produced as follows:
L4 = (
16 3
5 10
14 1
7 12
8 11
13 2
6 9
15 4
) ; (3)
N4 = (
16 5
3 10
12 1
7 14
2 11
13 8
6 15
9 4
) ; (4)
M4 = (
3 5
16 10
12 14
7 1
13 11
2 8
6 4
9 15
). (5)
L8 =
(
64 7
9 50
62 5
11 52
48 23
25 34
46 21
27 36
60 3
13 54
58 1
15 56
44 19
29 38
42 17
31 40
32 39
41 18
30 37
43 20
16 55
57 2
14 53
59 4
28 35
45 22
26 33
47 24
12 51
61 6
10 49
63 8 )
; (6)
N8 =
(
64 9
7 50
52 5
11 62
34 23
25 48
46 27
21 36
60 13
3 54
56 1
15 58
38 19
29 44
42 31
17 40
32 41
39 18
20 37
43 30
2 55
57 16
14 59
53 4
28 45
35 22
24 33
47 26
6 51
61 12
10 63
49 8 )
; (7)
M8 =
(
7 9
64 50
52 5
11 62
34 23
25 48
21 27
46 36
60 13
3 54
56 58
15 1
38 44
29 19
42 31
17 40
32 41
39 18
43 37
20 30
57 55
2 16
14 59
53 4
28 22
35 45
24 33
47 26
6 51
61 12
10 8
49 63)
. (8)
for the general case, 𝑛 multiple of 4, we have:
3. 3
Ln =
(
L1,1 L1,2 ⋯ L1,
n
2
L2,1 L2,2 … L2,
n
2
⋮ ⋮ … ⋮
Ln
2
,1 Ln
2
,2 … Ln
2
,
n
2 )
= (
l1,1 ⋯ l1,n
⋮ ⋱ ⋮
ln,1 ⋯ ln,n
) = (lu,v)u,v∈In
. (9)
where Ln is a matrix of order 𝑛 made up of blocks 2 × 2 given by
Ls,r = (
(n − 2(s − 1))n − 2(r − 1) (2s − 1)n − (2r − 1)
(2s − 1)n + (2r − 1) (n − 2s)n + 2r
) , s, r ∈ In
2
. (10)
To assist in the demonstration of Proposition 1 below, consider the matrix of 𝑛 order of blocks 2 × 2,
Ns,r, formed from Ln as follows:
Nn = (
n1,1 ⋯ n1,n
⋮ ⋱ ⋮
nn,1 ⋯ nn,n
) = (Ns,r)s,r∈In
2
, determined by (skewed exchanges):
Ns,r =
{
(
(n − 2(s − 1))n − 2(r − 1) (2s − 1)n + (2r − 1)
(2s − 1)n − (2r − 1) (n − 2s)n + 2r
) ,
se s, r têm mesma paridade;
(
(n − 2s)n + 2r (2s − 1)n − (2r − 1)
(2s − 1)n + (2r − 1) (n − 2(s − 1))n − 2(r − 1)
) ,
se s, r têm diferentes paridades
(11)
Examples 1. Equations (4) and (7) above.
Let Mn be the matrix of order 𝑛 generated from 𝑁𝑛 by swapping some entries of the two diagonals
with adjacent entries (above or below) as follows:
n1,1 with n2,1, nn,1 with nn−1,1, n1,n with n2,n, nn,n with nn−1,n;
n3,3 with n4,3, n3,n−2 with n4,n−2, nn−2,3 with nn−3,3,
nn−2,n−2 with nn−3,n−2; etc.
Formally, Mn is the matrix generated from Nn by the vertical exchanges:
n2u−1,2u−1 with n2u,2u−1;
n2u−1,n−(2u−1)+1 with n2u,n−(2u−1)+1;
nn−(2u−1)+1,2u−1 with nn−(2u−1),2u−1;
nn−(2u−1)+1,n−(2u−1)+1 with nn−(2u−1),n−(2u−1)+1;
with u ∈ In
4
. (12)
Proposition 1. The matrix 𝑀𝑛 defined above is a magic square.
Demonstration. In 𝑁𝑛 the sums of the numbers in the first and second lines of any double line of odd
order 𝑠 are respectively given by (in the first sums of the sums (13) and (14), r = 2u − 1 is odd and,
in the second, r = 2u is even):
4. 4
∑[(n − 2(s − 1))n − 2(2u − 1 − 1) + (2s − 1)n + (2(2u − 1) − 1)]
n 4
⁄
u=1
+ ∑[(n − 2s)n + 2 × 2u + (2s − 1)n − (2 × 2u − 1)]
n 4
⁄
u=1
= cn. (13)
and
∑[(2s − 1)n − (2(2u − 1) − 1) + (n − 2s)n + 2(2u − 1)]
n 4
⁄
u=1
+ ∑[(2s − 1)n + (2 × 2u − 1) + (n − 2(s − 1)n − 2(2u − 1))]
n 4
⁄
u=1
= cn (14)
Similarly, in 𝑁𝑛, the same is true for all double lines of even orders. Using the same procedure as
above, we can also prove that the sums of the numbers in each of the columns of 𝑁𝑛 are all equal to
𝑐𝑛. Note that if s = r then such numbers will have the same parity and therefore
Ns,s = (
(n − 2(s − 1))n − 2(s − 1) (2s − 1)n + (2s − 1)
(2s − 1)n − (2s − 1) (n − 2s)n + 2s
) , ∀s, 1 ≤ s ≤
n
2
. (15)
Swapping s by s′
=
n
2
+ 1 − s for in (15), we get
Ns′,s′ = (
(n − 2(s′ − 1))n − 2(s′ − 1) (2s′ − 1)n + (2s′ − 1)
(2s′ − 1)n − (2s′ − 1) (n − 2s′)n + 2s′
) , ∀s, 1 ≤ s ≤
n
2
. (16)
From (15) we have that the sum of the elements of the main diagonal of 𝑁𝑛 is equal to
∑[(n − 2(s − 1))n − 2(s − 1) + (n − 2s)n + 2s]
n 2
⁄
s=1
= cn +
n
2
. (17)
Analogously, calculate that the sum of the elements of the secondary diagonal is equal to cn −
n
2
. Be
s′
≝
n
2
+ 1 − s. So s and s′ will have different parities. Soon,
Ns,s′ = (
(n − 2s)n + 2s′ (2s − 1)n − (2s′ − 1)
(2s − 1)n + (2s′ − 1) (n − 2(s − 1))n − 2(s′ − 1)
) , ∀s, 1 ≤ s ≤
n
4
. (18)
Exchanging 𝑠 with 𝑠′ in (18), we get
Ns′,s = (
(n − 2s′)n + 2s (2s′ − 1)n − (2s − 1)
(2s′ − 1)n + (2s − 1) (n − 2(s′ − 1))n − 2(s − 1)
) , ∀s, 1 ≤ s ≤
n
4
. (19)
From (15) and (16) we have
5. 5
(n − 2(s − 1))n − 2(s − 1) − ((2s − 1)n − (2s − 1))
− (((2s′
− 1)n + (2s′
− 1)) − ((n − 2s′)n + 2s′
))
= 2n2
− 4sn + 4n + 2 − 4s′
n = 2, ∀s, 1 ≤ s ≤
n
4
. (20)
From (18) and (19) we have
(2s − 1)n − (2s′
− 1) − ((n − 2(s − 1))n − 2(s′
− 1))
− (((n − 2s′)n + 2s) − ((2s′
− 1)n + (2s − 1))) = −2, ∀s, 1 ≤ s
≤
n
4
(21)
By changing 𝑠 from 1 to
𝑛
4
and simultaneously exchanging (n − 2(s − 1))n − 2(s − 1) with
(2s − 1)n − (2s − 1) and (2s′
− 1)n + (2s′
− 1) with (n − 2s′)n + 2s′
, we will transfer
n
4
× 2 =
n
2
units from the main diagonal to the secondary diagonal. Also, no element sums of rows, columns, or
diagonals will change, as changes in row sums offset each other. In fact, from the Ns,s and Ns,s′
expressions, we have (n − 2(s − 1))n − 2(s − 1) − ((2s − 1)n − (2s − 1)) = (n − 2(s − 1))n −
2(s′
− 1) − ((2s − 1)n − (2s′ − 1)), and from the Ns′,s and Ns′,s′, expressions, we have
(n − 2s′)n + 2s − ((2s′
− 1)n + (2s − 1)) = (n − 2s′)n + 2s′ − ((2s′ − 1)n + (2s′ − 1)).
Examples 2. Equations (5) and (8) above.
Proposition 2. From the magic square Mn we can generate (2 (
n − 2
2
))
n 2
⁄
different magic squares.
Demonstration. Let's consider:
ni,j entry of Ns,r; np,j entry of Nu,r
As for whether the coordinate parities of (r, s) and (u, r) are the same or different, there are four
possibilities. Also there are four possibilities for ni,j to be input to Ns,r and that leaves two possibilities
for np,j to be input to Nu,r. In total, there are 32 possibilities. We claim that if we exchange ni,j with
np,j and, simultaneously, ni,j′ with np,j′, (j′
= n
2
+ 1 − j) then the sums of the elements of the rows and
columns of 𝑁𝑛 do not change. Let's look at a case below.
Case 1 (s, r, u with same parity; ni,j = (n − 2(s − 1))n − 2(r − 1); np,j = (n − 2(u − 1))n −
2(r − 1)).
We have:
(n − 2(s − 1))n − 2(r − 1) − ((n − 2(u − 1))n − 2(r − 1)) = −2sn + 2un. (22)
(2s − 1)n + (2r′ − 1) − ((2u − 1)n + (2r′
− 1)) = −(−2sn + 2un). (23)
Comparing (22) with (23) we notices the compensation. Analogously, the other thirty-one remaining
cases can be proved. For each column we have 2 (
n − 2
2
) possibilities to choose ni,j and np,j, since
we can interchange them, which explains the multiplication by 2. Now, we have the possibility to do
this for each column (without choosing elements of the diagonals)
n
2
times independently. By the
fundamental principle of counting the result follows.
6. 6
Comment 1. In [3] the magic square Mn of Proposition 1 is made from Ln initially by making
horizontal exchanges followed by inclined exchanges, as follows:
L4 = (
16 3
5 10
14 1
7 12
8 11
13 2
6 9
15 4
) ; H4 = (
3 16
5 10
1 14
7 12
8 11
2 13
6 9
4 15
) ; M4 = (
3 5
16 10
12 14
7 1
13 11
2 8
6 4
9 15
).
In fact, doing tilted swaps followed by vertical swaps generates the same magic squares generated
when doing horizontal swaps followed by tilted swaps (see figures below).
a b
c
inclined
a c
b
vertical
b c
a
;
a b
c
horizontal
b a
c
inclined
b c
a
Figure 1. Upper left triangle corner
a b
c
inclined
c b
a
vertical
c a
b
;
a b
c
horizontal
b a
c
inclined
c a
b
Figure 2. Upper right triangle corner
Proposition 3. From equation (10) we can generate the double even magic square
Qn = (
q1,1 ⋯ q1,n
⋮ ⋱ ⋮
qn,1 ⋯ qn,n
) = (Qs,r)s,r∈In
4
(24)
whose blocks of order 4 are given by
Qs,r
= (
2sn − n − 2r + 1 2sn − n + 2r − 1
n2
− 2sn + 2n − 2r + 2 n2
− 2sn + 2r
n2
− 2sn + 2r + 2 n2
− 2sn + 2n − 2r
2sn − n + 2r + 1 2sn − n − 2r − 1
2sn + n + 2r − 1 2sn + n − 2r + 1
n2
− 2n − 2sn + 2r n2
− 2sn − 2r + 2
n2
− 2sn − 2r n2
− 2sn − 2n + 2r + 2
2sn + n − 2r − 1 2sn + n + 2r + 1
) (25)
Demonstration. let's decompose Ln into (
n
4
)
2
blocks of order 4. Such blocks will take the form
Q′s,r
=
(
(n − 2(s − 1))n − 2(r − 1) (2s − 1)n − (2r − 1)
(2s − 1)n + (2r − 1) n2
− 2sn + 2r
(n − 2(s − 1))n − 2r (2s − 1)n − (2r + 1)
2sn − n + 2r + 1 (n − 2s)n + (2r + 2)
(n − 2s)n − 2(r − 1) 2sn + n − 2r + 1
(2s + 1)n + (2r − 1) (n − 2 − 2s)n + 2r
n2
− 2sn − 2r (2s + 1)n − (2r + 1)
(2s + 1)n + (2r + 1) (n − 2s − 2)n + 2r + 2)
(26)
In Q′s,r (s, r ∈ In 4
⁄ ) let's make, respectively, in the upper left corner and in the lower right corner of
the reader, rotations of triangles of numbers in an anticlockwise direction, namely, let's make the
permutations:
7. 7
((n − 2(s − 1))n − 2(r − 1), (2s − 1)n + (2r − 1), (2s − 1)n − (2r − 1))
→ ((2s − 1)n − (2r − 1), (n − 2(s − 1))n − 2(r − 1), (2s − 1)n
+ (2r − 1)) (27)
and
((n − 2s − 2)n + 2r + 2, (2s + 1)n − (2r + 1), (2s + 1)n + (2r + 1) )
→ ((2s + 1)n + (2r + 1), (n − 2s − 2)n + 2r + 2, (2s + 1)n
− (2r + 1) ) (28)
In the upper right and lower left corners (of the reader) make the corresponding permutations, now
clockwise. We will have constructed the matrix Qn defined in (24) and (25). To show that Qn is a
magic square, just note that each of the Qs,r (s, r ∈ In 4
⁄ ) is a non-normal magic square with a total
equal to 2n2
+ 2. Well,
n
4
(2n2
+ 2) = cn, implying that each of the rows, columns and diagonals
of Qn has the sum of its elements equal to the magic constant cn.
To the construction method of Qn we will give the name of four-corner triangle rotation method.
Example 3.
L4 = (
16 3
5 10
14 1
7 12
8 11
13 2
6 9
15 4
) ; Q4 = (
3 5
16 10
12 14
7 1
13 11
2 8
6 4
9 15
) = M4
L8 =
(
64 7
9 50
62 5
11 52
48 23
25 34
46 21
27 36
60 3
13 54
58 1
15 56
44 19
29 38
42 17
31 40
32 39
41 18
30 37
43 20
16 55
57 2
14 53
59 4
28 35
45 22
26 33
47 24
12 51
61 6
10 49
63 8 )
;
Q8 =
(
7 9
64 50
52 62
11 5
25 23
34 48
46 36
21 27
3 13
60 54
56 58
15 1
29 19
38 44
42 40
17 31
39 41
32 18
20 30
43 37
57 55
2 16
14 4
53 59
35 45
28 22
24 26
47 33
61 51
6 12
10 8
49 63)
≠ M8
In Q8 the total common to squares of order 4 is equal to 130 = 2 × 82
+ 2.
8. 8
Proposition 4. From Qn we can generate (2 (
n − 2
2
))
n 2
⁄
+ ((2 (
6
2
))
𝑛
8
−1
+ 1 ) (8 × (4!)2)
n
2
(
n
8
−1)
magic squares if n is a multiple of 8 and (2 (
n − 2
2
))
n 2
⁄
+ ((2 (
6
2
))
𝑛
8
−
1
2
) (8 × (4!)2)(
n
4
−1)
2
otherwise.
Demonstration. First of all, it is worth noting that we can apply the same treatment to 𝑄𝑛 as we applied
to 𝑀𝑛 in Proposition 2, to generate (2 (
n − 2
2
))
n 2
⁄
magic squares. By induction, aided by geometric
vision, we can easily prove that when n is a multiple of 8, the number of non-normal subsquares of
totals 2n2
+ 2 is
n
2
(
n
8
− 1), and otherwise that number of subsquares is (
n
4
− 1)
2
. In any case, in each
of the subsquares we can do 4 rotations and 4 reflections. We can also do 4! row permutations of the
subsquares and 4! permutations of columns of the same subsquares. As we did in Proposition 2, we
can still use all the numbers that are not on the diagonals, but that are in the subsquares that intersect
them, to generate more (2 (
6
2
))
𝑛
8
−1
+ 1 possibilities when 𝑛 is a multiple of 8 and (2 (
6
2
))
𝑛
8
−
1
2
otherwise. These procedures being independent, the fundamental principle of counting implies that
the total number of magic squares formed is as stated.
Comment 2. All the previous results are also valid in a dual situation, when we change the arithmetic
progression of odd numbers for that of even numbers, as done in [4]. For orders 4 and 8, for example,
the dual magic squares will be:
𝐷𝑀4 = (
4 6
15 9
11 13
8 2
14 12
1 7
5 3
10 16
) = 𝐷𝑄4; 𝐷𝑀8 =
(
8 10
63 49
51 6
12 61
33 24
26 47
22 28
45 35
59 14
4 53
55 57
16 2
37 43
30 20
41 32
18 39
31 42
40 17
44 38
19 29
58 56
1 15
13 60
54 3
27 21
36 46
23 34
48 25
5 52
62 11
9 7
50 64)
𝐷𝑄8 =
(
8 10
63 49
51 61
12 6
26 24
33 47
45 35
22 28
4 14
59 53
55 57
16 2
30 20
37 43
41 39
18 32
40 42
31 17
19 29
44 38
58 56
1 15
13 3
54 60
36 46
27 21
23 25
48 34
62 52
5 11
9 7
50 64)
Conclusion
It is possible to establish new construction and demonstration approaches for the Lohans’
magic squares. It is also possible to build from these new approaches, a very large amount of other
magic squares. Furthermore, everything is doubled when you change the arithmetic progression of
odd numbers to that of the even numbers.
9. 9
References
[1] Datta, B. and Singh, A. N., 1992, Magic squares in India, Indian Journal of Historyos Science,
27(1).
[2] Holger Danielsson, 2020, Magic Squares, Available on https://magic-squares.info/index.html.
Access on 02/15/2023.
[3] Miranda L. de O. and Miranda L. B. B., 2020, Lohans’ Magic Squares and the Gaussian
Elimination Method, JNMS, 3(1), 31-36. DOI: https://doi.org/10.3126/jnms.v3i1.33001. Available
on https://www.nepjol.info/index.php/jnms/article/view/33001. Access on 02/15/2023.
[4] Miranda L. de O. and Miranda L. B. B., 2020, Generalization of Dürer's Magic Square and New
Methods for Doubly Even Magic Squares, JNMS, Vol. 3, Nr. 2, pp.13-15. DOI:
https://doi.org/10.3126/jnms.v3i2.33955. Available on
https://www.nepjol.info/index.php/jnms/article/view/33955. Access on 02/15/2023.