A pandiagonal magic square or panmagic square (also diabolic square, diabolical square or diabolical magic square) is a
magic square
In recreational mathematics, a square array of numbers, usually positive integers, is called a magic square if the sums of the numbers in each row, each column, and both main diagonals are the same. The 'order' of the magic square is the number ...
with the additional property that the
broken diagonal In recreational mathematics and the theory of magic squares, a broken diagonal is a set of ''n'' cells forming two parallel diagonal lines in the square. Alternatively, these two lines can be thought of as wrapping around the boundaries of the squa ...
s, i.e. the diagonals that wrap round at the edges of the square, also add up to the
magic constant
The magic constant or magic sum of a magic square is the sum of numbers in any row, column, or diagonal of the magic square. For example, the magic square shown below has a magic constant of 15. For a normal magic square of order ''n'' – that is ...
.
A pandiagonal magic square remains pandiagonally magic not only under
rotation
Rotation, or spin, is the circular movement of an object around a '' central axis''. A two-dimensional rotating object has only one possible central axis and can rotate in either a clockwise or counterclockwise direction. A three-dimensional ...
or
reflection Reflection or reflexion may refer to:
Science and technology
* Reflection (physics), a common wave phenomenon
** Specular reflection, reflection from a smooth surface
*** Mirror image, a reflection in a mirror or in water
** Signal reflection, in ...
, but also if a row or column is
moved from one side of the square to the opposite side. As such, an
pandiagonal magic square can be regarded as having
orientations.
3×3 pandiagonal magic squares
It can be shown that
non-trivial In mathematics, the adjective trivial is often used to refer to a claim or a case which can be readily obtained from context, or an object which possesses a simple structure (e.g., groups, topological spaces). The noun triviality usually refers to a ...
pandiagonal magic squares of order 3 do not exist. Suppose the square
:
is pandiagonally magic with magic constant . Adding sums and results in . Subtracting and we get .
However, if we move the third column in front and perform the same argument, we obtain . In fact, using the
symmetries
Symmetry (from grc, συμμετρία "agreement in dimensions, due proportion, arrangement") in everyday language refers to a sense of harmonious and beautiful proportion and balance. In mathematics, "symmetry" has a more precise definiti ...
of 3 × 3 magic squares, all cells must equal . Therefore, all 3 × 3 pandiagonal magic squares must be trivial.
However, if the magic square concept is generalized to include geometric shapes instead of numbers – the
geometric magic square
A geometric magic square, often abbreviated to geomagic square, is a generalization of magic squares invented by Lee Sallows in 2001. A traditional magic square is a square array of numbers (almost always positive integers) whose sum taken in any r ...
s discovered by
Lee Sallows
Lee Cecil Fletcher Sallows (born April 30, 1944) is a British electronics engineer known for his contributions to recreational mathematics. He is particularly noted as the inventor of golygons, self-enumerating sentences, and geomagic squares. ...
– a 3 × 3 pandiagonal magic square does exist.
4×4 pandiagonal magic squares
The smallest non-trivial pandiagonal magic squares are 4 × 4 squares. All 4 × 4 pandiagonal magic squares must be
translationally symmetric to the form
Since each 2 × 2 subsquare sums to the magic constant, 4 × 4 pandiagonal magic squares are
most-perfect magic square
A most-perfect magic square of order ''n'' is a magic square containing the numbers 1 to ''n''2 with two additional properties:
# Each 2 × 2 subsquare sums to 2''s'', where ''s'' = ''n''2 + 1.
# All pairs of ...
s. In addition, the two numbers at the opposite corners of any 3 × 3 square add up to half the magic constant. Consequently, all 4 × 4 pandiagonal magic squares that are
associative
In mathematics, the associative property is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a valid rule of replacement f ...
must have duplicate cells.
All 4 × 4 pandiagonal magic squares using numbers 1-16 without duplicates are obtained by letting equal 1; letting , , , and equal 1, 2, 4, and 8 in some order; and applying some
translation
Translation is the communication of the Meaning (linguistic), meaning of a #Source and target languages, source-language text by means of an Dynamic and formal equivalence, equivalent #Source and target languages, target-language text. The ...
. For example, with , , , and , we have the magic square
The number of 4 × 4 pandiagonal magic squares using numbers 1-16 without duplicates is 384 (16 times 24, where 16 accounts for the translation and 24 accounts for the 4
! ways to assign 1, 2, 4, and 8 to , , , and ).
5×5 pandiagonal magic squares
There are many 5 × 5 pandiagonal magic squares. Unlike 4 × 4 pandiagonal magic squares, these can be
associative
In mathematics, the associative property is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a valid rule of replacement f ...
. The following is a 5 × 5 associative pandiagonal magic square:
In addition to the rows, columns, and diagonals, a 5 × 5 pandiagonal magic square also shows its magic constant in four "
quincunx
A quincunx () is a geometric pattern consisting of five points arranged in a cross, with four of them forming a square or rectangle and a fifth at its center. The same pattern has other names, including "in saltire" or "in cross" in heraldry (d ...
" patterns, which in the above example are:
: 17+25+13+1+9 = 65 (center plus adjacent row and column squares)
: 21+7+13+19+5 = 65 (center plus the remaining row and column squares)
: 4+10+13+16+22 = 65 (center plus diagonally adjacent squares)
: 20+2+13+24+6 = 65 (center plus the remaining squares on its diagonals)
Each of these quincunxes can be translated to other positions in the square by
cyclic permutation
In mathematics, and in particular in group theory, a cyclic permutation (or cycle) is a permutation of the elements of some set ''X'' which maps the elements of some subset ''S'' of ''X'' to each other in a cyclic fashion, while fixing (that is, ma ...
of the rows and columns (wrapping around), which in a pandiagonal magic square does not affect the equality of the magic constants. This leads to 100 quincunx sums, including broken quincunxes analogous to broken diagonals.
The quincunx sums can be proved by taking
linear combinations of the row, column, and diagonal sums. Consider the pandiagonal magic square
:
with magic constant . To prove the quincunx sum
(corresponding to the 20+2+13+24+6 = 65 example given above), we can add together the following:
: 3 times each of the diagonal sums
and
,
: The diagonal sums
,
,
, and
,
: The row sums
and
.
From this sum, subtract the following:
: The row sums
and
,
: The column sum
,
: Twice each of the column sums
and
.
The net result is
, which divided by 5 gives the quincunx sum. Similar linear combinations can be constructed for the other quincunx patterns
,
, and
.
(4''n''+2)×(4''n''+2) pandiagonal magic squares with nonconsecutive elements
No pandiagonal magic square exists of order
if consecutive
integer
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
s are used. But certain sequences of nonconsecutive integers do admit order-(
) pandiagonal magic squares.
Consider the sum 1+2+3+5+6+7 = 24. This sum can be divided in half by taking the appropriate groups of three addends, or in thirds using groups of two addends:
: 1+5+6 = 2+3+7 = 12
: 1+7 = 2+6 = 3+5 = 8
An additional equal partitioning of the sum of squares guarantees the semi-bimagic property noted below:
: 1
2 + 5
2 + 6
2 = 2
2 + 3
2 + 7
2 = 62
Note that the consecutive integer sum 1+2+3+4+5+6 = 21, an
odd
Odd means unpaired, occasional, strange or unusual, or a person who is viewed as eccentric.
Odd may also refer to:
Acronym
* ODD (Text Encoding Initiative) ("One Document Does it all"), an abstracted literate-programming format for describing X ...
sum, lacks the half-partitioning.
With both equal partitions available, the numbers 1, 2, 3, 5, 6, 7 can be arranged into 6 × 6 pandigonal patterns and , respectively given by:
Then
(where is the magic square with 1 for all cells) gives the nonconsecutive pandiagonal 6 × 6 square:
with a maximum element of 49 and a pandiagonal magic constant of 150.
This square is pandiagonal and semi-bimagic, that means that
rows, columns, main diagonals and broken diagonals have a sum of 150 and, if we square all the numbers in the square, only the rows and the columns are magic and have a sum of 5150.
For 10th order a similar construction is possible using the equal partitionings of the sum 1+2+3+4+5+9+10+11+12+13 = 70:
: 1+3+9+10+12 = 2+4+5+11+13 = 35
: 1+13 = 2+12 = 3+11 = 4+10 = 5+9 = 14
: 1
2 + 3
2 + 9
2 + 10
2 + 12
2 = 2
2 + 4
2 + 5
2 + 11
2 + 13
2 = 335 (equal partitioning of squares; semi-bimagic property)
This leads to squares having a maximum element of 169 and a pandiagonal magic constant of 850, which are also semi-bimagic with each row or column sum of squares equal to 102,850.
(6''n''±1)×(6''n''±1) pandiagonal magic squares
A
pandiagonal magic square can be built by the following algorithm.
4''n''×4''n'' pandiagonal magic squares
A
pandiagonal magic square can be built by the following algorithm.
If we build a
pandiagonal magic square with this algorithm then every
square in the
square will have the same sum. Therefore, many symmetric patterns of
cells have the same sum as any row and any column of the
square. Especially each
and each
rectangle will have the same sum as any row and any column of the
square. The
square is also a
most-perfect magic square
A most-perfect magic square of order ''n'' is a magic square containing the numbers 1 to ''n''2 with two additional properties:
# Each 2 × 2 subsquare sums to 2''s'', where ''s'' = ''n''2 + 1.
# All pairs of ...
.
(6''n''+3)×(6''n''+3) pandiagonal magic squares
A
pandiagonal magic square can be built by the following algorithm.
References
* W. S. Andrews, ''Magic Squares and Cubes''. New York: Dover, 1960. Originally printed in 1917. See especially Chapter X.
* Ollerenshaw, K., Brée, D.: ''Most-perfect pandiagonal magic squares.'' IMA, Southend-on-Sea (1998)
External links
Panmagic Square at MathWorld* http://www.azspcs.net/Contest/PandiagonalMagicSquares
{{DEFAULTSORT:Panmagic Square
Magic squares