Magic square
Overview
Recreational mathematics
Recreational mathematics is an umbrella term, referring to mathematical puzzles and mathematical games.Not all problems in this field require a knowledge of advanced mathematics, and thus, recreational mathematics often attracts the curiosity of non-mathematicians, and inspires their further study...
, a magic square of order n is an arrangement of n2 numbers, usually distinct integer
Integer
The integers are formed by the natural numbers together with the negatives of the non-zero natural numbers .They are known as Positive and Negative Integers respectively...
s, in a square
Square (geometry)
In geometry, a square is a regular quadrilateral. This means that it has four equal sides and four equal angles...
, such that the n numbers in all rows, all columns, and both diagonals sum to the same constant. A normal magic square contains the integers from 1 to n2. The term "magic square" is also sometimes used to refer to any of various types of word square
Word square
A word square is a special type of acrostic. It consists of a set of words written out in a square grid, such that the same words can be read both horizontally and vertically. The number of words, which is equal to the number of letters in each word, is known as the "order" of the square...
.
Normal magic squares exist for all orders n ≥ 1 except n = 2, although the case n = 1 is trivial, consisting of a single cell containing the number 1.