In recreational mathematics, a magic square of order n is an arrangement of n2 numbers, usually distinct integers, in a square, 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.
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. The smallest nontrivial case, shown below, is of order 3.
The constant sum in every row, column and diagonal is called the magic constant or magic sum, M. The magic constant of a normal magic square depends only on n and has the value
For normal magic squares of order n = 3, 4, 5, ..., the magic constants are:
- 15, 34, 65, 111, 175, 260, ... (sequence A006003 in OEIS).
Read more about Magic Square: History, Types and Construction, Related Problems
Famous quotes containing the words magic and/or square:
“You never see animals going through the absurd and often horrible fooleries of magic and religion.... Dogs do not ritually urinate in the hope of persuading heaven to do the same and send down rain. Asses do not bray a liturgy to cloudless skies. Nor do cats attempt, by abstinence from cats meat, to wheedle the feline spirits into benevolence. Only man behaves with such gratuitous folly. It is the price he has to pay for being intelligent but not, as yet, quite intelligent enough.”
—Aldous Huxley (18941963)
“O for a man who is a man, and, as my neighbor says, has a bone in his back which you cannot pass your hand through! Our statistics are at fault: the population has been returned too large. How many men are there to a square thousand miles in this country? Hardly one.”
—Henry David Thoreau (18171862)