A magic square can be expressed as 3 arithmetic progressions.
$1,2,3$ where consecutive terms differ by $1$
$3,5,7,9,11$ where consecutive terms differ by $2$
If we have 3 arithmetic progressions
$a,a+u,a+2u$
$a+v,a+u+v,a+2u+v$
$a+2v,a+2v+,a+2u+2v$
We can reorganize them into this magic square
$$a+u+2v,\ \ \ \ \ a,\ \ \ \ \ a+2u+v\\a+2u,\ \ \ \ \ a+u+v,\ \ \ \ \ a+2v\\a+v,\ \ \ \ \ a+2u+2v,\ \ \ \ \ a+u$$
Now we just need to ensure that each of these numbers are perfect squares
An arithmetic progression of squares can be expressed as a Pythagorean triple
We can find arithmetic progressions of perfect squares by taking a Pythagorean triple $X^2+Y^2=Z^2$ and letting
$r=X-Y$
$s=Z$
$t=X+Y$
Our arithmetic progression is $r^2,s^2,t^2$
For example $4^2+3^2=5^2$
$r=4-3=1$
$s=5$
$t=4+3=7$
and our arithmetic progression is $1,25,49$ with common difference 24
However, nothing has yet been discovered with this method of generating arithmetic progressions of squares.
This previous way of expressing a magic square was part of research previously done. Now, I will show my version of this, but first I must prove a few things.
The entries of a magic square are all odd
Let us try organizing all integers into four classes. The first class is $0 \bmod 4$ and numbers that give remainder $0$ when divided by $4$ are in this class. The second class is $1 \bmod 4$ and numbers that give remainder $1$ when divided by $4$ are in this class. This continues up to $3 \bmod 4$. (You can't have a remainder $4$ or higher if you are diving by $4$).
even numbers are in either the $0 \bmod 4$ or $2 \bmod 4$ class while odd numbers are in either the $1 \bmod 4$ or $3 \bmod 4$ class.
What class is the square of even numbers in?
$0 \bmod 4 * 0 \bmod 4 = 0 \bmod 4$
$2 \bmod 4 * 2 \bmod 4 = 4 \bmod 4 = 0 \bmod 4$
Whether the even number is $0 \bmod 4$ or $2 \bmod 4$, it's square is $0 \bmod 4$
What class is the square of odd numbers in?
$1 \bmod 4 * 1 \bmod 4 = 1 \bmod 4$
$3 \bmod 4 * 3 \bmod 4 = 9 \bmod 4 = 1 \bmod 4$
Whether the odd number is $1 \bmod 4$ or $3 \bmod 4$, it's square is $1 \bmod 4$
From one of our previous proofs, for some magic square of squares
$$A\ B\ C\\D\ E\ F\\G\ H\ I$$
we know that $B+H=2E$
Because $B$ and $H$ are squares, they must be either $0 \bmod 4$ or $1 \bmod 4$
If $B$ is $0 \bmod 4$ and $H$ is $1 \bmod 4$, what is $E$?
In other words, for what $n$ does $2 * n \bmod 4 = 1 \bmod 4$?
The answer is there is no $n$. This means that $B$ and $H$ cannot have those values. They must both be $0 \bmod 4$ or both be $1 \bmod 4$
What if $B \equiv 0 \bmod 4$, $H \equiv 0 \bmod 4, D \equiv 1 \bmod 4, F \equiv 1 \bmod 4$?
According to $B$ and $H$, $2 * n \bmod 4 = 0 \bmod 4$ so $n=0$ or $2$ and $E \equiv 0 \bmod 4$ (since $2 \bmod 4$ is not a square)
According to $D$ and $F$, $2 * n \bmod 4 = 2 \bmod 4$ so $n=1$ or $3$ and $E \equiv 1 \bmod 4$ (since $3 \bmod 4$ is not a square)
We have reached a contradiction, so these values for $B,H,D,F$ do not work. Instead they must all have the same value.
What if $B,H,D,F$ are all $ 1 \bmod 4$?
$$A\ 1\ C\\1\ E\ 1\\G\ 1\ I$$
Then $E \equiv 1 \bmod 4$
$$A\ 1\ C\\1\ 1\ 1\\G\ 1\ I$$
Then the sum of each row, column and diagonal is $3 \bmod 4$. This forces the rest of the values to be $ 1 \bmod 4$
What if $B,H,D,F$ are all $ 0 \bmod 4$?
$$A\ 0\ C\\0\ E\ 0\\G\ 0\ I$$
Then $E \equiv 0 \bmod 4$
$$A\ 0\ C\\0\ 0\ 0\\G\ 0\ I$$
Then the sum of each row, column and diagonal is $0 \bmod 4$. This forces the rest of the values to be $ 0 \bmod 4$
even numbers are in either the $0 \bmod 4$ or $2 \bmod 4$ class while odd numbers are in either the $1 \bmod 4$ or $3 \bmod 4$ class.
What class is the square of even numbers in?
$0 \bmod 4 * 0 \bmod 4 = 0 \bmod 4$
$2 \bmod 4 * 2 \bmod 4 = 4 \bmod 4 = 0 \bmod 4$
Whether the even number is $0 \bmod 4$ or $2 \bmod 4$, it's square is $0 \bmod 4$
What class is the square of odd numbers in?
$1 \bmod 4 * 1 \bmod 4 = 1 \bmod 4$
$3 \bmod 4 * 3 \bmod 4 = 9 \bmod 4 = 1 \bmod 4$
Whether the odd number is $1 \bmod 4$ or $3 \bmod 4$, it's square is $1 \bmod 4$
From one of our previous proofs, for some magic square of squares
$$A\ B\ C\\D\ E\ F\\G\ H\ I$$
we know that $B+H=2E$
Because $B$ and $H$ are squares, they must be either $0 \bmod 4$ or $1 \bmod 4$
If $B$ is $0 \bmod 4$ and $H$ is $1 \bmod 4$, what is $E$?
In other words, for what $n$ does $2 * n \bmod 4 = 1 \bmod 4$?
The answer is there is no $n$. This means that $B$ and $H$ cannot have those values. They must both be $0 \bmod 4$ or both be $1 \bmod 4$
What if $B \equiv 0 \bmod 4$, $H \equiv 0 \bmod 4, D \equiv 1 \bmod 4, F \equiv 1 \bmod 4$?
According to $B$ and $H$, $2 * n \bmod 4 = 0 \bmod 4$ so $n=0$ or $2$ and $E \equiv 0 \bmod 4$ (since $2 \bmod 4$ is not a square)
According to $D$ and $F$, $2 * n \bmod 4 = 2 \bmod 4$ so $n=1$ or $3$ and $E \equiv 1 \bmod 4$ (since $3 \bmod 4$ is not a square)
We have reached a contradiction, so these values for $B,H,D,F$ do not work. Instead they must all have the same value.
What if $B,H,D,F$ are all $ 1 \bmod 4$?
$$A\ 1\ C\\1\ E\ 1\\G\ 1\ I$$
Then $E \equiv 1 \bmod 4$
$$A\ 1\ C\\1\ 1\ 1\\G\ 1\ I$$
Then the sum of each row, column and diagonal is $3 \bmod 4$. This forces the rest of the values to be $ 1 \bmod 4$
$$1\ 1\ 1\\1\ 1\ 1\\1\ 1\ 1$$
What if $B,H,D,F$ are all $ 0 \bmod 4$?
$$A\ 0\ C\\0\ E\ 0\\G\ 0\ I$$
Then $E \equiv 0 \bmod 4$
$$A\ 0\ C\\0\ 0\ 0\\G\ 0\ I$$
Then the sum of each row, column and diagonal is $0 \bmod 4$. This forces the rest of the values to be $ 0 \bmod 4$
$$0\ 0\ 0\\0\ 0\ 0\\0\ 0\ 0$$
However, each of these entries is even and the square is not simplified. It's kind of like writing $\frac{2}{4}$; we would instead write $\frac{1}{2}$. Since all entries are even, we could keep dividing by $2$ until at least one entry is odd. Since we proved the entries are either all even or all odd, repeatedly dividing by $2$ would yield a square with all odd entries.
In short, a magic square of squares with all even entries is just a magic square of squares with all odd entries times an even square
Now, we see that a magic square of squares must have only odd entries.
However, each of these entries is even and the square is not simplified. It's kind of like writing $\frac{2}{4}$; we would instead write $\frac{1}{2}$. Since all entries are even, we could keep dividing by $2$ until at least one entry is odd. Since we proved the entries are either all even or all odd, repeatedly dividing by $2$ would yield a square with all odd entries.
In short, a magic square of squares with all even entries is just a magic square of squares with all odd entries times an even square
Now, we see that a magic square of squares must have only odd entries.
An arithmetic progression of odd squares can be expressed as an arithmetic progression of triangular numbers
Since each entry is an odd perfect square, each entry can be expressed as 8m+1 where m is a triangular number. A triangular number is the number of points in a triangle like this:
For example $8*3+1=25$ and $8*6+1=49$. This means that we can express an arithmetic progression of squares as an arithmetic progression of triangular numbers
An arithmetic progression of triangular numbers can be expressed as halves of an arithmetic series with difference 1
Triangular numbers can be expressed as an arithmetic series with difference 1. For example, $1+2+3+4=10$
$1+2+3+4+5=15$
$1+2+3+4+5+6=21$
For some triangular number, we'll say that it can be expressed as $1+2+...n$
Let's say we have an arithmetic progression of triangular numbers $X,Y, Z$
We know that $Z-Y=Y-X$
This means that
$\left(1+2\ ...\ n_Z \right) - \left(1+2\ ...\ n_Y\right) = \left(1+2\ ...\ n_Y \right) - \left(1+2\ ...\ n_X \right)$
$\left(n_Y+1\ \ \ \ +\ \ \ \ n_Y+2\ \ \ \ ...\ \ \ \ n_Z \right)=\left(n_X+1\ \ \ \ +\ \ \ \ n_X+2\ \ \ \ ...\ \ \ \ n_Y \right)$
By inspecting this equation, we see that we are looking for
an arithmetic series such that it can be split into 2 parts with equal sums.
We could express an arithmetic progression of triangular numbers as such an arithmetic series
With so many different ways to express a magic square of squares, hopefully we will be able to generate one of these and by extension generate a magic square of squares.
I will leave you with a little program that Intro to Categories students might find useful. This is a permutation calculator. In Intro to Categories, we have "permutations" that send one number to another. For example, the permutation $\left(ACBD\right)$ sends A to C, C to B, B to D, and D to A. When we link multiple of these permutations together we can "multiply" them together to get a single permutation. This process of multiplying permutations together can become tedious for larger permutations, so I created a program that multiplies permutations.
I love playing with the calculator at the bottom, just to let you know.
ReplyDeleteAnyways, I was just wondering why you decided to separate the integers into four classes. Does it matter that 4 is a square? Was 4 just the lowest number that could be used to prove that the entries of a magic square are odd?
Hello Nicole! 4 was just the lowest number needed to prove that the entries of a 3x3 magic square of squares is odd. However, using numbers other than 4 can lead to interesting results. For example, using $ \bmod 3$ shows that all elements are $ 1 \bmod 3$. Through this technique, we can even prove that each entry is $ 1 \bmod 24$.
DeleteHi Vijay! I liked your new approach to the problem at the beginning and thought it was interesting what resulted from it. Did you research advances made on this problem prior to your project or did you approach the problem by yourself? I cannot wait until next week, this is my favorite blog to read!
ReplyDeleteHello Jackson! I took a lot of help from previous research. Perhaps I wasn't clear enough in my posts, but last week's post and the beginning of this week's post are both part of previous research. Anyways, I really couldn't imagine coming up with all this amazing math on my own.
DeleteVery neat and interesting Vijay! I love how you include the calculator at the bottom. I'm looking forward to reading next week's blog and learning more about the problem.
ReplyDeleteHello Jack! I first created this calculator in Java for my Intro to Categories class and playing around with it really allowed me to understand how permutations work; I wasn't at all hindered by needing to put work into computation. I hope that this more user-friendly JavaScript version will allow others to also understand permutations.
DeleteHey Vijay! Thanks for including another calculator, it´s a great way to apply your research. I was just wondering which of the ways you think is the most likely to generate a perfect square of squares?
ReplyDeleteHello Carla! This week's calculator is actually unrelated to the 3x3 Magic Square of Squares problem, but I'll include a relevant one next time. In the research I have done since the post, I keep extending this chain of ways to express a 3x3 magic square of squares. Some of these later ones have been really useful to me.
DeleteHi Vijay! I really like the fact that you add a calculator at the bottom of all your posts. It is very interesting, and the program is written nicely. I like your approach to the complicated problem with past mathematical examples and proven theorems. Is it possible to create a magic square with only perfect squares? I can't wait until next week's post!
ReplyDeleteHello Gokul! My research question is trying to find if it's possible to create a 3x3 magic square with only perfect squares, but this problem has actually already been solved for larger squares. For example
Delete68² 29² 41² 37²
17² 31² 79² 32²
59² 28² 23² 61²
11² 77² 8² 49²
was discovered by Euler in 1770
Hey Vijay... I see you are doing a lot of work towards researching this problem and have made some useful discoveries. You've obviously done a lot of work towards trying to find possibilities for the magic square of squares, but have you done anything perhaps on the lines of proving the impossibility of such a square existing? Looking forward to how your research unfolds.
ReplyDeleteHello Abhinav! I forgot to mention it, but this week's post can actually help me proving the impossibility of a 3x3 magic square of squares. I showed that
Deleteif a 3x3 magic square of squares exists
then an arithmetic progression of triangular numbers exists
$p \Rightarrow q$
This also means not $q \Rightarrow $ not $p$
If an arithmetic progression of triangular numbers does not exist
then a 3x3 magic square of squares does not exist.
So all I would need to do is prove that one of these ways of expressing a 3x3 magic square of squares does not exist.
Hey Vijay, This looks like another great week of progress towards the Magic Square of Squares, I like how you lay out each step thats gets you closer to solving the problem in a way that makes sense to anyone. I hope to see another great week, keep up the good work
ReplyDeleteHello Michael! I'm glad to hear that you could understand what I wrote. This week was pretty great, but next week will be even better. Hopefully, I will be able to write something entirely original.
DeleteWow, these squares keep getting more and more interesting! As you brought in modular arithmetic in your approach to the problem, I was wondering if there are any known concepts within number theory that can be modeled or represented well by a magic square. Or as a more general question, in what ways can magic squares be understood from a more number-theory-oriented perspective? I can't wait to see what you discover!
ReplyDeleteHello Nathan! There is a way from of the research papers I read. Find $k_1,p_1,q_1,k_2,p_2,q_2,k_3,p_3,q_3$ such that $k_1^2 \left(p_1^3q_1 - p_1q_1^3 \right) = k_2^2 \left(p_2^3q_2 - p_2q_2^3 \right) = k_3^2 \left(p_3^3q_3 - p_3q_3^3 \right) >0$ and $k_1^2 \left(p_1^2 + q_1^2 \right)^2,k_2^2 \left(p_2^2 + q_2^2 \right)^2,k_3^2 \left(p_3^2 + q_3^2 \right)^2$
Deleteis an arithmetic progression
Hi Vijay. This was a great post and I learned a lot about your research process and the magic squares. The calculator was also fun to play with. I look forward to next week!
ReplyDeleteHello Anthony! You're right that early on I wasn't super clear on "how" I wanted to go about answering my question. At least I explained it in detail now. Hopefully I will catch things like this in the future.
ReplyDeleteWow, Vijay! You made ALOT of progress! This was an incredible post! I love the calculator!!! Can I buy it off you and put it on my website? I will credit you. Maybe we can set up a paypal account where the money goes to you. You know you will get customers every year as long as I teach Categories. :)
ReplyDeleteHello Mrs. Bailey! Here is a link to the JavaScript for my Permutation Calculator
Deletehttps://docs.google.com/document/d/1Tzy6Pz20GeinyS49GdxwqW7LW5E-VSuOaq898Zdk6V8/edit?usp=sharing
You can place the input textbox, submit button, and output paragraph anywhere in the body of the HTML and put the script inside the body at the very end.
Hi Vijay,
ReplyDeleteI am very interested in mathematical sciences and see you have done an amazing job!
Good Luck
Bhavik Rajaboina
Hello Bhavik! I hope that you enjoy my blog posts. I also include a special "calculator" at the end of each of my blog posts that might be fun to experiment with. Hopefully that will also add to your overall experience.
ReplyDelete