### Basic key method (ultra magic)

How to construct as perfect as possible magic squares which are an odd multiple of 4?First we analyze how the basic key method works for the construction of the 16x16 magic square. Than we investigate the possibilities to use a basic key to construct a 12x12 magic square.

Why does the basic key of the 16x16 magic square work?

How is it possible that the basic key leads to most perfect (Franklin pan)magic squares for each order is a multiple of 8.

1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16 = 136.

(1st) sum = sum = 34 = 1/4 x 136

 1 2 16 15 16 15 1 2

So, in the 16x16 magic square each 1/4 row/column gives 1/4 of the magic sum.

(2nd) sum = sum = 34 = 1/4 x 136

 1 2 16 15 16 15 1 2

So, in the 16x16 magic square each 1/4 diagonal gives 1/4 of the magic sum.

(3rd) Between opposite combinations must be an odd number of cells (opposite combinations must not be arranged next to each other).

 1 2 16 15 16 15 1 2

So the first grid can be reflected to construct the second grid and if you combine the first grid  with the second grid you get all the numbers from 1 up to 256 in the magic square.

How to get the right basic key to construct a 12x12 magic square?

For magic squares which are an odd multiple of 4 no basic key exists to comply to all three above mentioned conditions. You have to make a choice.

[Option a]

(1st) sum = sum = 26 = 1/3 x 78

 1 10 11 4 8 6 5 7 12 3 2 9 12 3 2 9 5 7 8 6 1 10 11 4

So each 1/3 row/column gives 1/3 of the magic sum (but 1/2 row/column gives not 1/2 of the magic sum).

(2nd) sum = sum = 39 = 1/2 x 78

 1 10 11 4 8 6 12 3 2 9 5 7

So each 1/2 diagonal gives 1/2 of the magic sum (and each [[parallel] bended diagonal gives the magic sum = Franklin feauture).

(3rd) Between each opposite combination is and odd number of cells, so the first grid can be reflected to construct the second grid and if you combine the first grid with the second grid you get all the numbers from 1 up to 144 in the magic square.

1x number from first grid

 1 10 11 4 8 6 5 7 12 3 2 9 12 3 2 9 5 7 8 6 1 10 11 4 1 10 11 4 8 6 5 7 12 3 2 9 12 3 2 9 5 7 8 6 1 10 11 4 1 10 11 4 8 6 5 7 12 3 2 9 12 3 2 9 5 7 8 6 1 10 11 4 1 10 11 4 8 6 5 7 12 3 2 9 12 3 2 9 5 7 8 6 1 10 11 4 1 10 11 4 8 6 5 7 12 3 2 9 12 3 2 9 5 7 8 6 1 10 11 4 1 10 11 4 8 6 5 7 12 3 2 9 12 3 2 9 5 7 8 6 1 10 11 4

+ 12 x (number -/- 1) from second grid

 9 4 9 4 9 4 9 4 9 4 9 4 2 11 2 11 2 11 2 11 2 11 2 11 3 10 3 10 3 10 3 10 3 10 3 10 12 1 12 1 12 1 12 1 12 1 12 1 7 6 7 6 7 6 7 6 7 6 7 6 5 8 5 8 5 8 5 8 5 8 5 8 6 7 6 7 6 7 6 7 6 7 6 7 8 5 8 5 8 5 8 5 8 5 8 5 4 9 4 9 4 9 4 9 4 9 4 9 11 2 11 2 11 2 11 2 11 2 11 2 10 3 10 3 10 3 10 3 10 3 10 3 1 12 1 12 1 12 1 12 1 12 1 12

= 12x12 magic square (option a)

 97 46 107 40 104 42 101 43 108 39 98 45 24 123 14 129 17 127 20 126 13 130 23 124 25 118 35 112 32 114 29 115 36 111 26 117 144 3 134 9 137 7 140 6 133 10 143 4 73 70 83 64 80 66 77 67 84 63 74 69 60 87 50 93 53 91 56 90 49 94 59 88 61 82 71 76 68 78 65 79 72 75 62 81 96 51 86 57 89 55 92 54 85 58 95 52 37 106 47 100 44 102 41 103 48 99 38 105 132 15 122 21 125 19 128 18 121 22 131 16 109 34 119 28 116 30 113 31 120 27 110 33 12 135 2 141 5 139 8 138 1 142 11 136

[option b]

(1st) sum = sum = 39 = 1/2 x 78

 1 11 10 2 7 8 12 4 3 9 6 5 12 2 3 11 6 5 1 9 10 4 7 8

So each 1/2 row/column gives 1/2 of the magic sum.

(2nd) The sum of the half winding rows is not 39, but the sum of the whole winding rows is 78.

So each diagonal gives the magic sum (but each 1/2 diagonal gives not 1/2 of the magic sum and each [parallel] bended diagonals gives not the magic sum).

(3rd) Between each opposite combination is and odd number of cells, so the first grid can be reflected to construct the second grid and if you combine the first grid with the second grid you get all the numbers from 1 up to 144 in the magic square.

1x number from first grid

 1 11 10 2 7 8 12 4 3 9 6 5 12 2 3 11 6 5 1 9 10 4 7 8 1 11 10 2 7 8 12 4 3 9 6 5 12 2 3 11 6 5 1 9 10 4 7 8 1 11 10 2 7 8 12 4 3 9 6 5 12 2 3 11 6 5 1 9 10 4 7 8 1 11 10 2 7 8 12 4 3 9 6 5 12 2 3 11 6 5 1 9 10 4 7 8 1 11 10 2 7 8 12 4 3 9 6 5 12 2 3 11 6 5 1 9 10 4 7 8 1 11 10 2 7 8 12 4 3 9 6 5 12 2 3 11 6 5 1 9 10 4 7 8

+ 12x (number -/- 1) from second grid

 5 8 5 8 5 8 5 8 5 8 5 8 6 7 6 7 6 7 6 7 6 7 6 7 9 4 9 4 9 4 9 4 9 4 9 4 3 10 3 10 3 10 3 10 3 10 3 10 4 9 4 9 4 9 4 9 4 9 4 9 12 1 12 1 12 1 12 1 12 1 12 1 8 5 8 5 8 5 8 5 8 5 8 5 7 6 7 6 7 6 7 6 7 6 7 6 2 11 2 11 2 11 2 11 2 11 2 11 10 3 10 3 10 3 10 3 10 3 10 3 11 2 11 2 11 2 11 2 11 2 11 2 1 12 1 12 1 12 1 12 1 12 1 12

= 12x12 magic square (option b)

 49 95 58 86 55 92 60 88 51 93 54 89 72 74 63 83 66 77 61 81 70 76 67 80 97 47 106 38 103 44 108 40 99 45 102 41 36 110 27 119 30 113 25 117 34 112 31 116 37 107 46 98 43 104 48 100 39 105 42 101 144 2 135 11 138 5 133 9 142 4 139 8 85 59 94 50 91 56 96 52 87 57 90 53 84 62 75 71 78 65 73 69 82 64 79 68 13 131 22 122 19 128 24 124 15 129 18 125 120 26 111 35 114 29 109 33 118 28 115 32 121 23 130 14 127 20 132 16 123 21 126 17 12 134 3 143 6 137 1 141 10 136 7 140

Ultra panmagic 12x12 square

It is also possible to construct an ultra panmagic 12x12 square in which each 4x4 sub-square has the following symmetric structure:

Two numbers of the same colour sums to (the lowest + highest number of the magic 12x12 square = 1 + 144 =) 145.

 1x number 12 2 2 12 5 6 6 5 10 4 4 10 1 11 11 1 8 7 7 8 3 9 9 3 12 2 2 12 5 6 6 5 10 4 4 10 1 11 11 1 8 7 7 8 3 9 9 3 12 2 2 12 5 6 6 5 10 4 4 10 1 11 11 1 8 7 7 8 3 9 9 3 12 2 2 12 5 6 6 5 10 4 4 10 1 11 11 1 8 7 7 8 3 9 9 3 12 2 2 12 5 6 6 5 10 4 4 10 1 11 11 1 8 7 7 8 3 9 9 3 12 2 2 12 5 6 6 5 10 4 4 10 1 11 11 1 8 7 7 8 3 9 9 3 + 12 x (number -/- 1) 10 3 10 3 10 3 10 3 10 3 10 3 4 9 4 9 4 9 4 9 4 9 4 9 4 9 4 9 4 9 4 9 4 9 4 9 10 3 10 3 10 3 10 3 10 3 10 3 5 8 5 8 5 8 5 8 5 8 5 8 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 6 7 5 8 5 8 5 8 5 8 5 8 5 8 12 1 12 1 12 1 12 1 12 1 12 1 2 11 2 11 2 11 2 11 2 11 2 11 2 11 2 11 2 11 2 11 2 11 2 11 12 1 12 1 12 1 12 1 12 1 12 1 = ultra panmagic 12x12 square 120 26 110 36