PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: High Entry average rating: No information on entry rating
[parent] construction of magic square of odd length (Algorithm)

The construction of an $n \times n$ magic square with $n$ being odd is simple. (The letter $x$ will be used as a placeholder).

First, place the number 1 in the middle square of the top row.

$$\begin{bmatrix} x & x & 1 & x & x \\ x & x & x & x & x \\ x & x & x & x & x \\ x & x & x & x & x \\ x & x & x & x & x \\ \end{bmatrix}$$

The 2 goes in the bottommost row, in the column to the right of the one where we put the 1. Each subsequent number goes in the row above, in the column to the right, wrapping around as needed.

$$\begin{bmatrix} x & x & 1 & x & x \\ x & 5 & x & x & x \\ 4 & x & x & x & x \\ x & x & x & x & 3 \\ x & x & x & 2 & x \\ \end{bmatrix}$$

But if that spot already has a number, the next number goes in the square below instead.

$$\begin{bmatrix} 17 & x & 1 & 8 & 15 \\ x & 5 & 7 & 14 & 16 \\ 4 & 6 & 13 & x & x \\ 10 & 12 & x & x & 3 \\ 11 & x & x & 2 & 9 \\ \end{bmatrix}$$

And so on and so forth. Of course this procedure can be rotated.




"construction of magic square of odd length" is owned by PrimeFan. [ owner history (1) ]
(view preamble | get metadata)

View style:


This object's parent.
Log in to rate this entry.
(view current ratings)

Cross-references: right, column, row, square, number, place, simple, odd, magic square

This is version 2 of construction of magic square of odd length, born on 2006-11-19, modified 2006-11-21.
Object id is 8572, canonical name is ConstructionOfMagicSquareOfOddLength.
Accessed 890 times total.

Classification:
AMS MSC05B15 (Combinatorics :: Designs and configurations :: Orthogonal arrays, Latin squares, Room squares)

Pending Errata and Addenda
None.
[ View all 1 ]
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add example | add (any)