Wednesday, August 1, 2018

Infinite Magic Squares

Magic squares have interested (recreational) mathematicians for hundreds, if not thousands, of years. A magic square is a $n\times n$ grid filled with integers such that the sum of integers in each row, column and diagonal is equal to a magic constant $M$.

There are various ways to construct magic squares. For odd integers, probably the most famous one is the Siamese method where one also requires that the grid is filled with distinctive positive integers in the range $1, \ldots, n^2$. Below is an example when $n=5$ (Du Royaume de Siam, 1693): \begin{equation*} \begin{array}{|c|c|c|c|c|} \hline 17 & 24 & 1 & 8 & 15 \\ \hline 23 & 5 & 7 & 14 & 16 \\ \hline 4 & 6 & 13 & 20 & 22 \\ \hline 10 & 12 & 19 & 21 & 3 \\ \hline 11 & 18 & 25 & 2 & 9 \\ \hline \end{array} \end{equation*} But what would happen if the grid would be infinite? The simplest “solution” to this problem would be setting all cells to zero \begin{equation*} \begin{array}{c|c|c|c|c} \ddots & \vdots & \vdots & \vdots & \kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.}\\ \hline \cdots & 0 & 0 & 0 & \cdots \\ \hline \cdots & 0 & 0 & 0 & \cdots \\ \hline \cdots & 0 & 0 & 0 & \cdots \\ \hline \kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.} & \vdots & \vdots & \vdots & \ddots \\ \end{array} \end{equation*} but this is not what we are really after here. We can obtain a slightly more interesting solution by subtracting the middle value from a Siamese magic square and adding zeros elsewhere: \begin{equation*} \begin{array}{c|c|c|c|c|c|c|c|c} \ddots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.} \\ \hline \cdots & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \cdots \\ \hline \cdots & 0 & 4 & 11 & -12 & -5 & 2 & 0 & \cdots \\ \hline \cdots & 0 & 10 & -8 & -6 & 1 & 3 & 0 & \cdots\\ \hline \cdots & 0 & -9 & -7 & \mathbf{0} & 7 & 9 & 0 & \cdots\\ \hline \cdots & 0 & -3 & -1 & 6 & 8 & -10 & 0 & \cdots \\ \hline \cdots & 0 & -2 & 5 & 12 & -11 & -4 & 0 & \cdots\\ \hline \cdots & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \cdots \\ \hline \kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.} & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots \end{array} \end{equation*} This procedure gives us an infinite magic square where the sum in each row, column and diagonal is equal to zero. This still does not feel quite right as the infinite square has nonzero elements only in the middle. But what about the infinite square below? \begin{equation}\tag{$\infty$}\label{good} \begin{array}{c|c|c|c|c|c|c|c|c} \ddots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.} \\ \hline \cdots & \mathbf{-1} & +1 & -1 & +1 & -1 & +1 & \mathbf{-1} & \cdots \\ \hline \cdots & +1 & \mathbf{-1} & +1 & -1 & +1 & \mathbf{-1} & +1 & \cdots \\ \hline \cdots & -1 & +1 & \mathbf{-1} & +1 & \mathbf{-1} & +1 & -1 & \cdots \\ \hline \cdots & +1 & -1 & +1 & \mathbf{-1} & +1 & -1 & +1 & \cdots \\ \hline \cdots & -1 & +1 & \mathbf{-1} & +1 & \mathbf{-1} & +1 & -1 & \cdots \\ \hline \cdots & +1 & \mathbf{-1} & +1 & -1 & +1 & \mathbf{-1} & +1 & \cdots \\ \hline \cdots & \mathbf{-1} & +1 & -1 & +1 & -1 & +1 & \mathbf{-1} & \cdots \\ \hline \kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.} & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots \end{array} \end{equation} It already looks quite magical with only +1 and -1 entries. But where would the series in each row, column and diagonal sum to? One can note that up, down, left and right from each diagonal cell we have Grandi's series $\sum_{n=1}^{\infty} (-1)^{n-1} = 1-1+1-1+1-1+\ldots$ Grandi's series is Cesàro summable, with Cesàro sum $\frac{1}{2}$. One way to justify this value is to set \begin{equation*} S = 1-1+1-1+1-1+\ldots \end{equation*} and then note that $S = 1-S$, and hence $S= \frac{1}{2}$. Now one may calculate \begin{align*} \ldots+1-1+1-1+\ldots &= -1 + \sum_{n=0}^{\infty} (-1)^n + \sum_{n=0}^{\infty} (-1)^n \\ & = -1 + \frac{1}{2}+\frac{1}{2}=0. \end{align*} Thus, the series in every row and column are Cesàro summable, with Cesàro sum $0$. But what about the diagonals? In both diagonals, after the center cell we have $-1-1-1-1-\ldots$ One can recognize this series as a specific case of the Riemann zeta function \begin{equation*} \zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s} \end{equation*} when $s=0$. We have that $\zeta(0)=-\frac{1}{2}$, thus one may write $-1-1-1-1-\ldots = -\zeta(0)=\frac{1}{2}$. In fact, this series is related to Grandi's series via the Dirichlet eta function \begin{equation*} \eta(s) = \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n^s} = (1-2^{1-s})\zeta(s). \end{equation*} Now when $s=0$, we have that \begin{equation*} 1-1+1-1+\ldots = \eta(0)=-\zeta(0) = -1-1-1-1-\ldots \end{equation*} The diagonals are \begin{align*} \ldots-1-1-1-1-\ldots &= -1- \sum_{n=1}^{\infty}\frac{1}{n^0}-\sum_{n=1}^{\infty}\frac{1}{n^0} \\ &=-1-\zeta(0)-\zeta(0)=0. \end{align*} Now the infinite square (\ref{good}) is indeed an infinite magic square as the series in every row, column and diagonal are equal (in above sense) to the magic constant $M=0$. We note that by multiplying the infinite magic square (\ref{good}) with an integer $a$, we obtain another infinite magic square with $M=0$. If we set $a=-1$, we obtain the “evil twin:” \begin{equation*} \begin{array}{c|c|c|c|c|c|c|c|c} \ddots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.} \\ \hline \cdots & \mathbf{+1} & -1 & +1 & -1 & +1 & -1 & \mathbf{+1} & \cdots \\ \hline \cdots & -1 & \mathbf{+1} & -1 & +1 & -1 & \mathbf{+1} & -1 & \cdots \\ \hline \cdots & +1 & -1 & \mathbf{+1} & -1 & \mathbf{+1} & -1 & +1 & \cdots \\ \hline \cdots & -1 & +1 & -1 & \mathbf{+1} & -1 & +1 & -1 & \cdots \\ \hline \cdots & +1 & -1 & \mathbf{+1} & -1 & \mathbf{+1} & -1 & +1 & \cdots \\ \hline \cdots & -1 & \mathbf{+1} & -1 & +1 & -1 & \mathbf{+1} & -1 & \cdots \\ \hline \cdots & \mathbf{+1} & -1 & +1 & -1 & +1 & -1 & \mathbf{+1} & \cdots \\ \hline \kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.} & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots \end{array} \end{equation*} If we square the values of the magic square (\ref{good}), we obtain an infinite square full of ones: \begin{equation*} \begin{array}{c|c|c|c|c} \ddots & \vdots & \vdots & \vdots & \kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.} \\ \hline \cdots & 1 & 1 & 1 & \cdots \\ \hline \cdots & 1 & 1 & 1 & \cdots \\ \hline \cdots & 1 & 1 & 1 & \cdots \\ \hline \kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.} & \vdots & \vdots & \vdots & \ddots \\ \end{array} \end{equation*} In every direction we have \begin{align*} \ldots+1+1+1+1+\ldots &= 1+ \sum_{n=1}^{\infty}\frac{1}{n^0}+\sum_{n=1}^{\infty}\frac{1}{n^0} \\ &=1+\zeta(0)+\zeta(0)=0. \end{align*} Thus, it is also an infinite magic square. This new square, however, seems little bit less magical than the original one (\ref{good}).

3 comments:

  1. Interesting stuff.

    ReplyDelete
  2. HAPPY HAPPY New Year to you
    https://happynewyearrose.blogspot.com/

    ReplyDelete
  3. replica t-shirts uk, combining elegant style and cutting-edge technology, a variety of styles of replica hoodies, the pointer walks between your exclusive taste style.

    ReplyDelete