Wikipedia:Reference desk/Archives/Mathematics/2021 March 11

= March 11 =

Associative magic square
This is one where the sum of each pair of cells symmetrical about the centre is the same. For odd order, in every case I've seen when the values are consecutive integers, the entry in the central cell is the central value. Is there an easy proof of this? 2A00:23C6:AA08:E500:39B2:4132:33B9:7AA2 (talk) 23:54, 11 March 2021 (UTC)
 * If the order of the associative magic square is $$n$$, where $$n$$ is odd, and the values in the cells are the numbers from $$1$$ up to $$n^2$$, I can show that the value in the central cell is either the middle value $$(n^2{+}1)/2$$, or one of the two extremes $$1$$ and $$n^2$$. Let $$c$$ stand for the centre value, and $$s$$ stand for the sum of two symmetrically opposite values. There are $$\tfrac{1}{2}(n^2{-}1)$$ such pairs, so the sum of all values equals $$c+\tfrac{1}{2}(n^2{-}1)s$$, which has to equal $$\tfrac{1}{2}n^2(n^2{+}1)$$. Solving for $$s$$ as a function of $$c$$ gives a simple fraction that I won‘t write down explicitly, but clearly $$s$$ is strictly antimonotonically related to $$c$$. Since $$1\leq c\leq n^2$$, this gives us a range for $$s$$, which turns out to be $$n^2\leq s\leq n^2{+}2$$. The extremes for $$s$$ in this range correspond to the two extremes for $$c$$ mentioned earlier. Since $$s$$ has to be a whole number, the only remaining option is $$s=n^2{+}1$$, which gives $$c=\tfrac{1}{2}(n^2{+}1)$$. I did not readily see an argument excluding the extremes, and if $$c=1$$ is possible, then so is $$c=n^2$$. --Lambiam 01:09, 12 March 2021 (UTC)
 * Here is the missing piece. Denote the average cell value by $$a=\tfrac{1}{2}(n^2{+}1)$$. Let $$v_{ij}$$ denote the value in row $$i$$, column $$j$$. All row sums are the same, so $$\Sigma_j v_{1j}=\Sigma_j v_{nj}=na$$. The values in the bottom row are the complements with respect to $$s$$ of the values in the top row, so we also have that $$\Sigma_j v_{nj}=\Sigma_j(s{-}v_{1j})=n(s{-}a)$$. Together, this gives us $$s=2a=n^2{+}1$$. Combining this with the observation above that $$c+\tfrac{1}{2}(n^2{-}1)s=\tfrac{1}{2}n^2(n^2{+}1)$$ directly leads to $$c=\tfrac{1}{2}(n^2{+}1)$$, without the detour of solving for $$s$$ as a function of $$c$$. --Lambiam 01:38, 12 March 2021 (UTC)
 * Yes, thanks for that. I'd just assumed that it was so, then found it less than obvious.2A00:23C6:AA08:E500:B461:92F1:876:761E (talk) 14:27, 12 March 2021 (UTC)