Template:Short description An antimagic square of order n is an arrangement of the numbers 1 to n2 in a square, such that the sums of the n rows, the n columns and the two diagonals form a sequence of 2n + 2 consecutive integers. The smallest antimagic squares have order 4.<ref name=":1">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Antimagic squares contrast with magic squares, where each row, column, and diagonal sum must have the same value.<ref name=":0" />

ExamplesEdit

Order 4 antimagic squaresEdit


34 
2 15 5 13 → 35
16 3 7 12 → 38
9 8 14 1 → 32
6 4 11 10 → 31

33

30

37

36

 29

32 
1 13 3 12 → 29
15 9 4 10 → 38
7 2 16 8 → 33
14 6 11 5 → 36

37

30

34

35

  31

In both of these antimagic squares of order 4, the rows, columns and diagonals sum to ten different numbers in the range 29–38.<ref name=":0" />

Order 5 antimagic squaresEdit

5 8 20 9 22
19 23 13 10 2
21 6 3 15 25
11 18 7 24 1
12 14 17 4 16
21 18 6 17 4
7 3 13 16 24
5 20 23 11 1
15 8 19 2 25
14 12 9 22 10

In the antimagic square of order 5 on the left, the rows, columns and diagonals sum up to numbers between 60 and 71.<ref name=":0">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> In the antimagic square on the right, the rows, columns and diagonals add up to numbers in the range 59–70.<ref name=":1" />

GeneralizationsEdit

A sparse antimagic square (SAM) is a square matrix of size n by n of nonnegative integers whose nonzero entries are the consecutive integers <math>1,\ldots,m</math> for some <math>m\leq n^2</math>, and whose row-sums and column-sums constitute a set of consecutive integers.<ref name="Alon 19872">Template:Cite journal</ref> If the diagonals are included in the set of consecutive integers, the array is known as a sparse totally anti-magic square (STAM). Note that a STAM is not necessarily a SAM, and vice versa.

A filling of the Template:Math square with the numbers 1 to n2 in a square, such that the rows, columns, and diagonals all sum to different values has been called a heterosquare.<ref name="hetero">{{#invoke:Template wrapper|{{#if:|list|wrap}}|_template=cite web |_exclude=urlname, _debug, id |url = https://mathworld.wolfram.com/{{#if:Heterosquare%7CHeterosquare.html}} |title = Heterosquare |author = Weisstein, Eric W. |website = MathWorld |access-date = |ref = Template:SfnRef }}</ref> (Thus, they are the relaxation in which no particular values are required for the row, column, and diagonal sums.) There are no heterosquares of order 2, but heterosquares exist for any order n ≥ 3: if n is odd, filling the square in a spiral pattern will produce a heterosquare,<ref name = "hetero"/> and if n is even, a heterosquare results from writing the numbers 1 to n2 in order, then exchanging 1 and 2. It is suspected that there are exactly 3120 essentially different heterosquares of order 3.<ref>Peter Bartsch's Heterosquares at magic-squares.net</ref>

See alsoEdit

ReferencesEdit

Template:Reflist

Template:Magic polygons

External linksEdit

  • {{#invoke:Template wrapper|{{#if:|list|wrap}}|_template=cite web

|_exclude=urlname, _debug, id |url = https://mathworld.wolfram.com/{{#if:AntimagicSquare%7CAntimagicSquare.html}} |title = Antimagic Square |author = Weisstein, Eric W. |website = MathWorld |access-date = |ref = Template:SfnRef }}