Wednesday, June 25, 2014

Magic Squares

"In recreational mathematics, a magic square is an arrangement of distinct numbers (i.e. each number is used once), usually integers, in a square grid, where the numbers in each row, and in each column, and the numbers in the forward and backward main diagonals, all add up to the same number."

Srinivasa Ramanujan (1887-1920) was an Indian mathematician and autodidact who made extraordinary contributions to mathematical analysis, number theory, infinite series, and continued fractions.  The mathematical community during his time was largely located in Europe so he pretty much developed his own mathematical research in isolation.  On of Ramanujan interesting creation was his super magic square, which looks like this:

22
12
18
87
88
17
9
25
10
24
89
16
19
86
23
11

What's amazing about Ramanujan's magic square is that not only do all the rows, columns, and diagonals sum to 139 but also the four corners,  the four middle squares, the first rows two middle numbers and the last rows middle numbers as well as the first columns two middle numbers and the last columns middle numbers, and all the four squares that make up each corn.  The best part is that the top row is Ramanujan's date of birth!  Altogether this makes his magic square a super magic square. 

I wanted to make a normal magic square with my birthday as the top row and I came close since the rows and diagonals sum to 134 but not the columns.  The weird part is that the sum of the first column is 123 which is a difference of -11 from 134, the second columns sum is 119 with a difference of -15, the third columns sum is 143 with a difference of 9, and the fourth columns sum is 151 with a difference of 17.  If you add the first two columns together you get -26 and if you add the last two columns together you get 26.  Adding them together gives you 0....strange!
My almost magic square with my birthday as the top row:

18
07
19
90
84
12
10
28
06
19
90
19
15
81
24
14 

To create my magic square I simply put my birthday in the top row and either subtracted or added the difference of my birthday numbers from Ramanujan's.  For example, the first square in my first column is 18 which is 4 less than Ramanujan's first square in his first column; so I subtracted 4 from every number in Ramanujan's first column.  My second number is 7, which is 5 less than Ramanujan's square which is 12 so I subtracted 5 from every number in Ramanujan's second column. I did this until I finished with the last column. Then I tried playing around with the numbers to get the columns to add to 134 and that's when I noticed if you add the differences of the sums of the columns you get zero.

References:
http://en.wikipedia.org/wiki/Srinivasa_Ramanujan
https://www.youtube.com/watch?v=IW74oqvhSuI

No comments:

Post a Comment