# Sum to 15 (Magic Squares)

## Instructions and Rules

Fill in the numbers 1 thru 9 in the nine white squares, using each number exactly once. The goal is to arrange the numbers so that the sums are exactly 15 along each horizontal row, each vertical row, and the two main diagonals. Try to beat the clock!

Elapsed time: 0.0

Congrats! You're a winner!

You finished in a time of seconds!

## Magic Square

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).

## History

Magic squares were known to Chinese mathematicians, as early as 650 BCE and Arab mathematicians, possibly as early as the 7th century, when the Arabs conquered northwestern parts of the Indian subcontinent and learned Indian mathematics and astronomy, including other aspects of combinatorial mathematics. The first magic squares of order 5 and 6 appear in an encyclopedia from Baghdad circa 983 CE, the Encyclopedia of the Brethren of Purity (Rasa'il Ihkwan al-Safa); simpler magic squares were known to several earlier Arab mathematicians. Some of these squares were later used in conjunction with magic letters as in (Shams Al-ma'arif) to assist Arab illusionists and magicians.

## Sources

Above taken from Wikipedia. More details on Magic Squares can be found at Wolfram Mathworld.