Vous êtes sur la page 1sur 34

STUDY OF MAGIC SQUARES IN INDIA

M.D.SRINIVAS
CENTRE FOR POLICY STUDIES
mdsrinivas50@gmail.com
MAGIC SQUARES IN INDIA
The first Chapter of Srinivasa Ramanujans Note Books is on Magic
Squares. T. Vijayaraghavan, in his article on Jaina Magic Squares (1941)
notes: "The author of this note learnt by heart at the age of nine the
following pan-diagonal square which was taught to him by an elderly
person who had not been to school at all."

8 11 2 13
1 14 7 12
15 4 9 6
10 5 16 3

This shows the extraordinary popularity of Magic Squares in India.

Indian mathematicians specialized in the construction of a special class of
magic squares called sarvatobhadra or pan-diagonal magic squares,
where, apart from the sum of the entries of each row, column and the
principal diagonals, the sum of all "broken diagonals" add up to the same
magic sum.
KAKAPUA OF NGRJUNA (c. 100 BCE)
V
0 1 0 8
0 9 0 2
6 0 3 0
4 0 7 0

n-3 1 n-6 8

n-3 1 n-5 8
n-7 9 n-4 2

n-6 9 n-4 2
6 n-8 3 n-1

6 n-7 3 n-1
4 n-2 7 n-9

4 n-2 7 n-8
Pan-diagonal with total 2n Total 2n+1



KAKAPUA OF NGRJUNA (c. 100 BCE)
The following pan-diagonal magic square totaling to 100 has also been
called Ngrjunya

30 16 18 36
10 44 22 24
32 14 20 34
28 26 40 6
SARVATOBHADRA OF VARHAMIHIRA (550 CE)
In the Chapter on Gandhayukti of Bhatsahit, Varhamihira describes
the Sarvatobhadra perfumes
z?
? u
( > H
H "
" ~
?

~
2 3 5 8
u 5 8 2 3
4 1 7 6
7 6 " 4 1

SARVATOBHADRA OF VARHAMIHIRA
As the commentator Bhaotpala (c.950) explains:
S u ~ "
~-" ?
+
S? u Sz Sz
z US u " ?
U j ? :
In this kacchapua with 16 cells, when four substances are mixed in whatever
way: When the four substances with their mentioned number of parts are
mixed, then the total will be 18 parts; this happens in the above kacchapua
when the perfumes are mixed from top to bottom (along the columns) or
horizontally (along the rows), along the four directions, or the central
quadrangle, or the four corner cells, or the middle two cells of the first row
together with those of the last row; the middle two cells of the second and third
row or the first and last cells of the same, or in any other manner. If the
substances in such four cells are added there will be 18 parts in all. ... Since, in
whatever way they are mixed, they lead to 18 parts, they are called
Sarvatobhadra.
SARVATOBHADRA OF VARHAMIHIRA

If we add
8 0 8 0
0 8 0 8
0 8 0 8
8 0 8 0

to the Sarvatobhadra of Varhamihira, we get

10 3 13 8
5 16 2 11
4 9 7 14
15 6 12 1

This belongs to a class of 4x4 pan-diagonal magic squares studied by
Nryaa Paita in Gaitakaumud (c.1356)
JAINA MAGIC SQUARE

7 12 1 14
2 13 8 11
16 3 10 5
9 6 15 4

Pan-diagonal magic square found in the Inscriptions at Dudhai in Jhansi
District (c. 11 the Century) and at the Jaina Temple in Khajuraho (c. 12
th

Century).




ANCIENT INDIAN METHOD FOR ODD SQUARES
8 1 6
3 5 7
4 9 2

17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
This method of proceeding along small diagonals (alpa-ruti) is described
as an ancient method by Nryaa Paita in Gaitakaumud (c.1356).
Nryaa also displays the eight 3x3 magic squares that can be
constructed in this manner.
De La Loubere, French Ambassador in Siam, wrote in 1693 that he learnt
this Indian method from a French doctor M Vincent who had lived in
Surat.
BHADRAGAITA OF NRYAA (C.1356)
Chapter XIV of Gaitakaumud, titled Bhadragaita, is devoted to a
detailed mathematical study of magic squares.
?
"]
] u
-


H " q
j" "
" ]
Thus, a nxn magic square is Samagarbha if n = 4m, Viamagarbha if n =
4m + 2, and Viama if n = 2m + 1, where m =1, 2, 3 ...
The classification of Magic Squares in to Samagarbha, Viamagarbha and
Viama is also found in the Prkta work Gaitasrakaumud of hakkura
Pheru (c.1300)
KUAKA AND MAGIC SQUARES
Nryaa uses the following linear indeterminate equation to determine
the initial term a and the constant difference d of an arithmetic sequence of
n
2
numbers, which can be used to fill an n x n square in order to have the
entries in each row and column add to the sum S
nS = (n
2
/2) [a + a+( n
2
- 1) d ]
S = na + (n/2) (n
2
- 1) d
There exist (an infinite number of) integral solutions for a, d, if S is
divisible by gcd(n, (n/2)(n
2
-1)).
Thus, S should be divisible by n when n is odd, and by n/2 when n is
even.


KUAKA AND MAGIC SQUARES
NryaaExample: S = 40 and n = 4.
40 = 4a +30d
a =-5, d = 2, or a =10, d = 0, or a =25, d = -2, etc.
-5 9 19 17

10 10 10 10 25 11 1 3
21 15 -3 7

10 10 10 10 -1 5 23 13
1 3 25 11

10 10 10 10 19 17 -5 9
23 13 -1 5

10 10 10 10 -3 7 21 15

Nryaa also discusses the case where n arithmetic sequences, of n
elements each, are used to fill up the cells of a nxn magic square.
PANDIAGONAL 4x4 SQUARES OF NRYAA


Pan-diagonal Magic Square: Apart from the sum of the entries of each
row, column and the principal diagonals, the sum of all the "broken
diagonals" add up to the same number.
Nryaa Paita displayed 24 pan-diagonal 4x4 magic squares, with
entries 1, 2, ..., 16, the top left entry being 1. Nryaa also remarked that
(by permuting the rows and columns cyclically) we can construct 384 pan-
diagonal 4x4 magic squares with entries 1, 2, ..., 16.
The fact that there are only 384 pan-diagonal 4x4 magic squares, was
proved by B.Rosser and R.J.Walker in 1938. A simpler proof was given
by T.Vijayaraghavan in 1941.
PROPERTIES OF PANDIAGONAL 4x4 MAGIC SQUARES

Property 1: Let M be a pan-diagonal 4x4 magic square with entries 1, 2,
..., 16, which is mapped on to the torus by identifying opposite edges of
the square. Then the entries of any 2x2 sub-square formed by consecutive
rows and columns on the torus add up to 34.

1 12 13 8
15 6 3 10
4 9 16 5
14 7 2 11

For example, 1+12+15+6 = 1+12+14+7 = 34
Property 2: Let M be a 4x4 pan-diagonal magic square with entries 1, 2,
..., 16, which is mapped on to the torus. Then, the sum of an entry of M
with another which is two squares away from it along a diagonal (in the
torus) is always 17.
For example, 1+16 = 6+11 = 15+2 = 4+13 = 14+3 = 9+8 = 17
PROPERTIES OF PANDIAGONAL 4x4 MAGIC SQUARES
The "neighbours" of an element of a 4x4 pan-diagonal magic square
(which is mapped on to the torus as before) are the elements which are
next to it along any row or column. For example, 3, 5, 2 and 9 are the
"neighbours" of 16 in the magic square below.

1 12 13 8
15 6 3 10
4 9 16 5
14 7 2 11

Property 3 (Vijayaraghavan): Let M be a 4x4 pan-diagonal magic
square with entries 1, 2, ..., 16, which is mapped on to the torus. Then the
neighbours of the entry 16 have to be 2, 3, 5 and 9 in some order.
We can use the above properties to construct 4x4 pan-diagonal magic
squares starting with 1 placed in any desired cell.
Proposition: There are precisely 384 pan-diagonal 4x4 magic squares
with entries1, 2, ..., 16.
SAMAGARBHA MAGIC SQURES
This seems to be an old method for construction of samagarbha or 4nx4n
magic square from a 4x4 magic square which is also described by
hakkura Pheru and Nryaa. We illustrate this by constructing an 8x8
square following the method given by hakkura Pheru. We start with a
pan-diagonal 4x4 square.
1 8 13 12
14 11 2 7
4 5 16 9
15 10 3 6
Then we proceed as follows:

SAMAGARBHA MAGIC SQURES


Finally we arrive at the pan-diagonal 8x8 magic square


1 32 61 36 5 28 57 40
62 35 2 31 58 39 6 27
4 29 64 33 8 25 60 37
63 34 3 30 59 38 7 26
9 24 53 44 13 20 49 48
54 43 10 23 50 47 14 19
12 21 56 41 16 17 52 45
55 42 11 22 51 46 15 18


One of the properties of an 8x8 pan-diagonal magic square seems to be
that the sum of four alternating cells along any diagonal adds to half the
magic sum.

SAMAGARBHA MAGIC SQURES
Another version of this traditional method has been noted Nryaa, who
has given the following example of construction of a 8x8 square from a
4x4 square.
1 8 13 12
14 11 2 7
4 5 16 9
15 10 3 6



The above construction does not lead to a pan-diagonal 8x8 magic square,
even though we started with a pan-diagonal 4x4 square.
SAMAGARBHA MAGIC SQURES
We slightly modify Nryaas procedure so that we obtain a pan-
diagonal 8x8 square from a pan-diagonal 4x4 square

1 8 13 12
14 11 2 7
4 5 16 9
15 10 3 6





NRYAAS FOLDING METHOD FOR SAMAGARBHA
SQUARES

z
Uq
?? U
z>



U
(SU S
++


FOLDING METHOD FOR SAMAGARBHA SQUARES
Two samagarbha squares known as the coverer and the covered are to be
made. Their combination is to be understood in the same manner as the
folding of palms. The mlapakti (base sequence) has an arbitrary first
term and constant difference and number of terms equal to the order of
the magic square. Another similar sequence is called the parapakti
(other sequence). The quotient of phala (desired magic sum) decreased
by the sum of the mlapakti when divided by the sum of the parapakti
[is the gua]. The elements of the parapakti multiplied by that gives the
guapakti. The two sequences mlapakti and guapakti are reversed
after half of the square is filled. The cells of the coverer are filled
horizontally and those of the covered vertically. Half of the square is
filled [by the sequence] in order and the other half in reverse order. The
way of combining magic square is here enunciated by the son of Nhari.
FOLDING METHOD FOR SAMAGARBHA SQUARES
Nryaas Example 1: 4x4 Square adding to 40
Mlapakti: 1, 2, 3, 4
Parapakti: 0, 1, 2, 3
Gua = [40 - (1+ 2+ 3+ 4)] / [0+1+2+3] = 5
Guapakti: 0, 5, 10, 15
The chdya (covered) and chdaka (coverer) are

2 3 2 3 5 0 10 15
1 4 1 4 10 15 5 0
3 2 3 2 5 0 10 15
4 1 4 1 10 15 5 0


FOLDING METHOD FOR SAMAGARBHA SQUARES
Sampukaraa (folding) gives
2+15 3+10 2+0 3+5

17 13 2 8
1+0 4+5 1+15 4+10

1 9 16 14
3+15 2+10 3+0 2+5
=
18 12 3 7
4+0 1+5 4+15 1+10

4 6 19 11
Nryaa also displays the other square which is obtained by
interchanging the covered and the coverer.
This method leads to a pan-diagonal magic square.
Nryaas Example 2: 8x8 Square adding to 260
Mlapakti: 1, 2, 3, 4, 5, 6, 7, 8
Parapakti: 0, 1, 2, 3, 4, 5, 6, 7
Gua = [260 - (1+ 2+ +8)] / [0+1+2++7] = 8
Guapakti: 0, 8, 16, 24, 32, 40, 48, 56
FOLDING METHOD FOR SAMAGARBHA SQUARES
The chdya and chdaka are

Sampukaraa gives

NRYAAS FOLDING METHOD FOR ODD SQUARES
u
S
+ ? +
zU zq zU>
U uz
Two sequences referred to as the mlapakti and the guapakti are to
be determined as earlier. The first number should be written in the
middle cell of the top row and below this the numbers of the sequence in
order. The rest of the numbers are to be entered in order from above.
The first number of the second sequence is to be written in the same way
[in the middle cell of the top row]; the second etc. numbers are also to
be written in the same way. The rule of combining the covered and the
coverer is also the same as before.


FOLDING METHOD FOR ODD SQUARES
Example: 5x5 Square adding to 65
Mlapakti: 1, 2, 3, 4, 5
Parapakti: 0, 1, 2, 3, 4
Gua = [65 - (1+ 2+ 3+ 4+ 5)] / [0+1+2+3+4] = 5
Guapakti: 0, 5, 10, 15, 20
The chdya and chdaka are

4 5 1 2 3 15 20 0 5 10
5 1 2 3 4 20 0 5 10 15
1 2 3 4 5 0 5 10 15 20
2 3 4 5 1 5 10 15 20 0
3 4 5 1 2 10 15 20 0 5



FOLDING METHOD FOR ODD SQUARES
Sampukaraa gives
4+10 5+5 1+0 2+20 3+15

14 10 1 22 18
5+15 1+10 2+5 3+0 4+20

20 11 7 3 24
1+20 2+15 3+10 4+5 5+0
=
21 17 13 9 5
2+0 3+20 4+15 5+10 1+5

2 23 19 15 6
3+5 4+0 5+20 1+15 2+10

8 4 25 16 12
Nryaas method happens to be an instance of combining two Mutually
Orthogonal Latin Squares. However, it does not yield a pan-diagonal
magic square as the diagonal elements of the squares are not all different.
MODIFICATION OF NRYAAS FOLDING METHOD FOR ODD
SQUARES

We may modify the above prescription and construct pan-diagonal magic
squares of odd order n>1, whenever n is not divisible by 3, as follows:
Example: Pan-diagonal 5x5 Square adding to 65
Mlapakti: 1, 2, 3, 4, 5
Parapakti: 0, 1, 2, 3, 4
Gua = [65 - (1+ 2+ 3+ 4+ 5)] / [0+1+2+3+4] = 5
Guapakti: 0, 5, 10, 15, 20

The chdya and chdaka are now chosen as
2 4 1 3 5

5 15 0 10 20
3 5 2 4 1

10 20 5 15 0
4 1 3 5 2

15 0 10 20 5
5 2 4 1 3

20 5 15 0 10
1 3 5 2 4

0 10 20 5 15

MODIFICATION OF NRYAAS FOLDING METHOD FOR ODD
SQUARES
Sampukaraa gives
2+20 4+10 1+0 3+15 5+5

22 14 1 18 10
3+0 5+15 2+5 4+20 1+10

3 20 7 24 11
4+5 1+20 3+10 5+0 2+15
=
9 21 13 5 17
5+10 2+0 4+15 1+5 3+20

15 2 19 6 23
1+15 3+5 5+20 2+10 4+0

16 8 25 12 4
The above square is clearly pan-diagonal.
EXAMPLES FROM RAMANUJANS NOTEBOOK
The first chapter of Ramanujans Notebook deals with Magic Squares. It is
said that he might have made these entries while he was still at the School.

The above happens to be an example of Nryaas folding method for odd squares.



EXAMPLES FROM RAMANUJANS NOTEBOOK

The second example above happens to be an instance of Nryaas folding method
for doubly even squares.
EXAMPLES FROM RAMANUJANS NOTEBOOK
REFERENCES
1. Gaitakaumud of Nryaa Paitas, Ed. by Padmkara Dvivedi, 2
Vols, Varanasi 1936, 1942.
2. T. Vijayaraghavan, On Jaina Magic Squares, The Mathematics Student, 9
(3), 1941, 97-102.
3. B. Datta and A. N. Singh (Revised by K. S. Shukla), Magic Squares in
India, Ind. Jour. Hist. Sc. 27, 1992, 51-120.
4. T. Kusuba, Combinatorics and Magic-squares in India: A Study of
Nryaa Paitas Gaita-kaumud, Chapters 13-14, PhD Dissertation,
Brown University 1993.
5. Paramanand Singh, The Gaitakaumud of Nryaa Paita: Chapter
XIV, English Translation with Notes, Gaita Bhrat, 24, 2002, 34-98.
6. Gaitasrakaumud of hakkura Pheru, Ed. with Eng. Tr. and Notes by
SaKHYa (S. R. Sarma, T. Kusuba, T. Hayashi, and M. Yano), Manohar,
New Delhi, 2009.

REFERENCES

7. B.C.Berndt, Ramanujans Notebooks, Part I, Springer, New York 1985.
8. Raja Sridharan and M. D. Srinivas, Study of Magic Squares in India , in R.
Sujatha et al ed., Math Unlimited: Essays in Mathematics, Taylor &
Francis, London 2011, pp. 383-391.
9. Raja Sridharan and M.D.Srinivas, Folding Method of Nryaa Paita
for the Construction of Samagarbha and Viama magic Squares, IJHS, 47,
2012, pp.589-605.

Vous aimerez peut-être aussi