-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path05B15-MagicSquare.tex
More file actions
37 lines (32 loc) · 975 Bytes
/
05B15-MagicSquare.tex
File metadata and controls
37 lines (32 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
\documentclass[12pt]{article}
\usepackage{pmmeta}
\pmcanonicalname{MagicSquare}
\pmcreated{2013-03-22 12:14:39}
\pmmodified{2013-03-22 12:14:39}
\pmowner{drini}{3}
\pmmodifier{drini}{3}
\pmtitle{magic square}
\pmrecord{6}{31626}
\pmprivacy{1}
\pmauthor{drini}{3}
\pmtype{Definition}
\pmcomment{trigger rebuild}
\pmclassification{msc}{05B15}
\endmetadata
\usepackage{amsmath}
\begin{document}
A magic square of order $n$ is an $n\times n$ array using each one of the numbers $1,2,3,\ldots,n^2$ once and such that the sum of the numbers in each row, column or main diagonal is the same.
Example:
\begin{equation*}
\begin{pmatrix}
8 & 1 & 6\\
3 & 5 & 7\\
4 & 9 & 2
\end{pmatrix}
\end{equation*}
It's easy to prove that the sum is always $\frac{1}{2}n(n^2+1)$. So in the example with $n=3$ the sum is always $\frac{1}{2}(3\times 10)=15$.
One way to generalize this concept is to allow any numbers in the entries, instead of $1,2,\ldots,n$.
%%%%%
%%%%%
%%%%%
\end{document}