A New Procedure for Magic Squares (Part I)
Zig Zag Consecutive 5x5 and 9x9 MaskGenerated Squares
A Discussion of the New Method
Magic squares such as the Loubère have a center cell which must always contain the middle number of
a series of consecutive numbers, i.e. a number which is equal to one half the sum of the first and last numbers of the series, or
½(n^{2} + 1). The properties of these regular or associated Loubère squares are:
 That the sum of the horizontal rows,
vertical columns and corner diagonals are equal to the magic sum S.
 The sum of any two numbers that are diagonally equidistant from the center (DENS) is equal to
n^{2} + 1, i.e., or twice the number in the center cell and are complementary to each other.
In this method the numbers on the square are placed consecutively starting from the leftmost column and zigged zagged up and down between two rows as was done in
the ZigZag and Mask generated 9x9 square method Zig Zag 9x9 Cross and MaskGenerated Methods (Part II) using odd numbers to start and
even numbers to finish.
In addition, it will also be shown that the sums of these squares follow the new sum equation as was shown in the
New block Loubère Method:
S = ½(n^{3} ± an)
Construction of a 5x5 Magic Square
Method: Reading zig zag from left to right  use of mask
 Construct Square 1 by adding consecutive numbers in a zig zag manner to the cells. Don't fill in the center row but proceed to the first cell the last row (the number 6).
 On reaching 10 reverse the pattern by adding consecutive numbers, filling the center row then proceeding from 15 to 16 along the
yellow path, and filling in the last two rows. On reaching 20 proceed to 21 and fill up the top two rows in a
zig zag manner(Squares 2 and 3).

⇒ 
2
1   3 
 5 
 2  
4  
11  12  13 
14  15 
 7  
9  
6   8 
 10 

⇒ 
3
 35  
1  22  3 
24  5  55  10 
21  2  23 
4  25  75  10 
11  12  13 
14  15  65  0 
16  7  18 
9  20  70  5 
6  17  8 
19  10  60  5 
55  60  65 
70  75  35  
10  5  0 
5  10   

⇒ 
 Where the grey sums on the penultimate right hand column intersect the grey sums in the next to the last row adjust the values in these cells by adding and subtracting
the values in the last row and columns to generate 4. At this point four duplicates (in green) have been generated.
 Generate a mask whereby the sums of the columns and rows are each 50 and the right and left diagonals are 80 and 75, respectively. This assures that when each
of these values is added to the corresponding cell in square 4 (as in the de la Hire method) that all sums will equal 115.
In addition the corresponding equation for the sum of this square is
S = ½(n^{3} + 21n).
4
 35 
11  22  3 
24  5  65 
21  2  23 
4  15  65 
11  12  13 
14  15  65 
16  7  18 
4  20  65 
6  22  8 
19  10  65 
65  65  65 
65  65  40 

+ 
Mask A
25  20  
 5 
  
50  
 5  25 
 20 
25   25 
 
 25  
 25 

⇒ 
5
 115 
36  42  3 
24  10  115 
21  2  23 
54  15  115 
11  17  38 
14  35  115 
41  7  43 
4  20  115 
6  47  8 
19  35  115 
115  115  115 
115  115  115 

Construction of a 9x9 Magic Square
Method: Reading zig zag from left to right  use of mask
 Construct Square 1 by adding consecutive numbers numbers in a zig zag manner to the cells as was done to the 5x5 square above (square 1).
 After reaching number 36 jump to the center row and fill it consecutively (Square 2).
 After reaching 45 jump to the last row and zig zag fill up to 54 (Square 3).
1
1   3   5  
7   9 
 2   4  
6   8  
10   12   14 
 16   18 
 11   13  
15   17  
    
   
 20   22  
24   26  
19   21   23 
 25   27 
 29   31  
33   35  
28   30   32 
 34   36 

⇒ 
2
1   3   5  
7   9 
 2   4  
6   8  
10   12   14 
 16   18 
 11   13  
15   17  
37  38  39  40  41 
42  43  44  45 
 20   22  
24   26  
19   21   23 
 25   27 
 29   31  
33   35  
28   30   32 
 34   36 

⇒ 
3
1   3   5  
7   9 
 2   4  
6   8  
10   12   14 
 16   18 
 11   13  
15   17  
37  38  39  40  41 
42  43  44  45 
 20   22  
24   26  
19   21   23 
 25   27 
46  29  48  31  50 
33  52  35  54 
28  47  30  49  32 
51  34  53  36 

 From 54 go across to 55 and fill up to 63 (Square 4), followed by 64, 72 and 73 following the zig zag path. (Square 5 and 6).
4
1   3   5  
7   9 
 2   4  
6   8  
10   12   14 
 16   18 
 11   13  
15   17  
37  38  39  40  41 
42  43  44  45 
55  20  57  22  59 
24  61  26  63 
19  56  21  58  23 
60  25  62  27 
46  29  48  31  50 
33  52  35  54 
28  47  30  49  32 
51  34  53  36 

⇒ 
5
1   3   5  
7   9 
 2   4  
6   8  
10  65  12  67  14 
69  16  71  18 
64  11  66  13  68 
15  70  17  72 
37  38  39  40  41 
42  43  44  45 
55  20  57  22  59 
24  61  26  63 
19  56  21  58  23 
60  25  62  27 
46  29  48  31  50 
33  52  35  54 
28  47  30  49  32 
51  34  53  36 

⇒ 
 At this point not all columns, rows or diagonals sum to 369.
 Where the grey sums on the penultimate right hand column intersect the grey sums in the next to the last row adjust the values in these cells by adding and subtracting
the values in the last row and columns to generate 7. At this point five duplicates (in light orange) have been generated.
6
 189  
1  74  3  76  5  78 
7  80  9  333  36 
73  2  75  4  77 
6  79  8  81  405  36 
10  65  12  67  14 
69  16  71  18  342  27 
64  11  66  13  68 
15  70  17  72  396  27 
37  38  39  40  41 
42  43  44  45  369  0 
55  20  57  22  59 
24  61  26  63  387  18 
19  56  21  58  23 
60  25  62  27  351  18 
46  29  48  31  50 
33  52  35  54  378  9 
28  47  30  49  32 
51  34  53  36  360  9 
333  342  351 
360  369  378 
387  396  405 
189  
36  27  18  9  0 
9  18  27  36   

⇒ 
7
 207 
37  74  3  76  5  78 
7  80  9  369 
73  2  75  4  77 
6  79  8  45  369 
10  92  12  67  14 
69  16  71  18  369 
64  11  66  13  68 
15  70  10  72 
369 
37  38  39  40  41 
42  43  44  45  369 
55  20  57  22  59 
24  43  26  63  369 
19  56  39  58  23 
60  25  62  27  369 
46  29  48  31  50 
24  52  35  54  369 
28  47  30  58  32 
51  34  53  36  369 
369  369  369 
369  369  369 
369  369  369 
225 

+ 
 A possible mask for use with square 7 adds either 81 or 99 (each a multiple of 9) of mask B to the appropriate cells of square 7. The number 81 was picked so
as to use numbers >= to n^{2}. 91 was pulled out a hat in order that the sum of 81 + 99 with 369 added to 549.
The diagonals were similarly adjusted using these two numbers.
 Addition of the right factors gives square 8 with S = 549 = ½(n^{3} + 41n) and the
modification of 18 numbers.
Mask B
81     
99    
    
  81  99 
    99 
 81   
 99   81  
   
 81    
  99  
    
81  99   
  99   81 
   
99   81   
   
   99  
   81 

⇒ 
8
 549 
118  74  3  76  5  177 
7  80  9  549 
73  2  75  4  77 
6  79  89  144  549 
10  92  12  67  113 
69  97  71  18  549 
64  110  66  94  68 
15  70  10  72 
549 
37  137  39  40  41 
42  43  143  45  549 
55  20  57  22  59 
105  142  26  63  549 
19  56  138  58  104 
60  25  62  27  549 
145  29  147  31  50 
24  52  35  54  549 
28  47  30  157  32 
51  34  53  117  549 
549  549  549 
549  549  549 
549  549  549 
549 

 Alternatively Mask C may be produced which uses a more logical construction.
 We start by subtracting each of the diagonals(207,225) from square 7 from 369 to give 162 and 144, respectively and which will be used as what I call the
"de la Hire constants" much as 81 and 99 were used above.
Addition of the sum of these two numbers, 162 + 144 = 406 to
369 gives 775 a magic presum.
 If we subtract the sum 775 from the two diagonals we obtain the following two sums:
775 = 207 + 568 and 775 = 225 + 560.
 At this point it may be seen that 568 or 569 cannot be broken down into exact multiples of 144 and 162.
 Only by converting the presum 775 into 819 (by the addition of 44) can we obtain a solution such that the following conditions are obeyed:
The right diagonal: 819 = 207 + 612 = 207 + 2(144) + 2(162)
The left diagonal: 819 = 225 + 594 = 225 + 3(144) + 162
The rows and columns: 819 = 369 + 2(144) + 162.
 Generate the mask using the 144 and 162 factors adding these factors to the appropriate cells in square 7 to generate square 9. Sometimes duplicates are formed
so go back and tweak the mask a little (move some of the cell numbers around) until no duplicates are generated. (Note that the numbers about the diagonals
are somewhat symmetrical about the center cell.)
 Square 9 has a magic sum equal to 819, i.e., S = 819 = ½(n^{3} + 101n).
Mask C
144   144  
162     
   144  
144   162  
  162   
 144   144 
162     144 
  144  
 144   144  
   162 
 144    144 
 162   
  144   
162  144   
144  162    
144    
   162  
  144  144 

⇒ 
9
 819 
181  74  147  76  167 
78  7  80  9  819 
73  2  75  148  77 
150  79  170  45  819 
10  92  174  67  14 
69  160  71  162  819 
226  11  66  13  212 
15  70  134  72 
819 
37  182  39  184  41 
42  43  44  207  819 
55  164  57  22  203 
24  205  26  63  819 
19  56  183  58  23 
222  169  62  27  819 
190  191  48  31  50 
168  52  35  54  819 
28  47  30  220  32 
51  34  197  180  819 
819  819  819 
819  819  819 
819  819  819 
819 

This completes this section on a new zig zag consecutive 5x5 and 9x9 MaskGenerated Methods (Part I). The next section deals with
new zig zag 7x7 MaskGenerated Methods (Part II). To return to homepage.
Copyright © 2010 by Eddie N Gutierrez. EMail: Fiboguti89@Yahoo.com