Check order, magic constant, row sums, column sums, diagonals, repeated values, missing numbers, and one blank cell in normal magic squares.
| Order | Cell Count | Normal Range | Magic Constant |
|---|---|---|---|
| 3 by 3 | 9 cells | 1 through 9 | 15 |
| 4 by 4 | 16 cells | 1 through 16 | 34 |
| 5 by 5 | 25 cells | 1 through 25 | 65 |
| 6 by 6 | 36 cells | 1 through 36 | 111 |
| 7 by 7 | 49 cells | 1 through 49 | 175 |
| Line Type | How Many | Formula | Pass Condition |
|---|---|---|---|
| Rows | n | Sum across each row | Every row equals target |
| Columns | n | Sum down each column | Every column equals target |
| Main diagonal | 1 | Top-left to bottom-right | Equals target when required |
| Other diagonal | 1 | Top-right to bottom-left | Equals target when required |
| Square | Order | Constant | Useful Check |
|---|---|---|---|
| Lo Shu | 3 by 3 | 15 | Center is 5 and all lines total 15 |
| Durer square | 4 by 4 | 34 | Rows, columns, diagonals total 34 |
| Odd Siamese square | 5 by 5 | 65 | Each row and column total 65 |
| Order 6 normal square | 6 by 6 | 111 | Range must contain 1 through 36 |
| Situation | Best Source | Required Data | Solver Output |
|---|---|---|---|
| One blank in a row | Row sum | Other row cells known | Target minus known sum |
| One blank in a column | Column sum | Other column cells known | Target minus known sum |
| One diagonal blank | Diagonal sum | Blank lies on diagonal | Diagonal candidate value |
| Normal square gap | Range audit | Exactly one number absent | Missing range value |
A square can have correct line sums but still repeat a value. Normal mode catches duplicates and absent numbers from 1 through n squared.
When a blank sits on a row, column, and diagonal, all candidate values should agree before the fill is trusted.
A magic square is an arrangement of number in a square grid where the total of the numbers in each row, each column, and both main diagonals is equal to the same total. This total is refered to as a magic constant. The magic constant must be the same for each of the rows, each of the columns, and both of the main diagonals of the square.
A magic square is only considered to be a magic square when each of these lines add up to the same magic constant. If the rows and the columns add up to the same number, but the diagonals does not, the square is only a semi-magic square. The calculator allow for the user to input a grid of numbers.
The user can choose the order of the square that the user is to be calculated, as well as whether the numbers within the magic square must be within a normal range of consecutive numbers. A normal range of numbers would be a magic square that use all of the numbers from 1 to the square of the order of the magic square. Any numbers outside of this range may be used, or the same number may be use more than once within the magic square.
In the case that the user wish to determine the missing number within the magic square, one of the cells can be flag as a blank cell. To find the missing number for one of the cells within the magic square, the calculator utilize the magic constant for that square. To find the value for the blank cell, the calculator subtracts the total of the other numbers within the row that includes the blank cell and the total of the other numbers within the column that includes the blank cell from the magic constant.
The number that is determined through each of these calculations will be the same if the blank cell is within a row, a column, and one of the main diagonals of the magic square. If the number that is calculated from the row does not match the number that is calculated from the column and diagonal that include the blank cell, then the grid isnt a magic square. The magic constant that is calculated for a magic square will differ based off the order of that magic square and the range of numbers that are used within that magic square.
For magic squares that use the normal range of consecutive numbers from 1 to the square of the order, a formula may be use to calculate the magic constant. The formula include elements of the order of the magic square and the sum of 1 and the last number in the range. Tables of the expected constant for magic squares of various sizes is provided on the calculator.
Comparing the calculated constant to these tables is one way of determining whether the magic square is correct in it’s calculations prior to verify each line of the grid. Another feature of the calculator include a range audit. For a magic square to be normal, each of the integer in the range should be utilized in the magic square, and each of those integers should be used only once within that grid.
An audit feature of the calculator will identify whether there are any duplicated number within the grid or whether any numbers are missing from the range of numbers that are to be utilized. This feature is one way of confirming that the magic square is normal. There are different methods for constructing magic squares then others depending upon the order of the magic square that is constructed.
For instance, the Siamese method is one method for constructing magic squares with an odd order. Different methods are required for constructing magic squares of even order then for those of odd order, as the pattern of the numbers that are to be within each row and column of even order are different than those of odd order magic squares. While the calculator does not automatically construct magic squares for the user, it can verify the correctness of any constructed magic square.
Through employing such a systematic way of evaluating the magic square, errors can be found within the constructed magic square. Errors may include incorrect diagonals, repeated number within the magic square, or one or more blank cell that dont fit within the calculation of the magic constant. Through the use of this calculator, the need for manually performing calculations to verify the correctness of the magic square is removed.
The calculator allows the user to confirm the properties of the magic square that they have construct.
