CH. VII] 



MAGIC SQUARES 



155 



The construction of singly-even pandiagonal squares (that is, 

 those whose order is 4m + 2) is impossible, but that of doubly- 

 even squares (that is, those whose order is 4m) is possible. 



Here is one way of constructing a doubly-even pandiagonal 

 square. Suppose the order of the square is 4m, and as before 

 let us write the number in a cell in the scale 4m, that is, as 

 4mp + r, so that p and r are the radix and unit-digits, with the 

 convention that r cannot be zero. Place p lt p it p a , ..., p tm in 

 order in the cells in the bottom row. Proceeding from p 1 by 

 steps (2m, 1) fill up 2m cells with it. And proceed similarly 

 with the other radix-digits. Next place r u r%, ..., r im in order 

 in the cells in the first column. Proceeding from r x by steps 

 (1, 2m) fill up 2m cells with it. And proceed similarly with 

 the other unit-digits. Then if we take for r„ r 2 , ..., r im , the 

 values 1,2, ..., 2m, 4m, 4m- 1, ...,2m+ l,and for p u pa, ...,p im , 

 the values 0, 1, ..., 2m — 1, 4m — 1, ..., 2m, the square will be 

 pandiagonally magic. I leave the demonstration to my readers. 

 In the case when m = 1, n = 4, the p and r subsidiary squares, 

 and the resulting magic square are shown in figures xix, xx, 

 xxi, ii. 



Subsidiary p Square. Subsidiary r Square. Resulting Square. 



Figure xix. Figure xx. Figure xxi. 



The rows, columns, and all diagonals of pandiagonal squares 

 possess the magic property. So also do a group of any n numbers 

 connected cyclically by steps (c, d) provided the first two numbers 

 of the group are such that when divided by n they have either 

 different quotients or different remainders. Such groups include 

 rows, columns, and diagonals as particular cases. Thus in the 

 square delineated in figure ii on page 137 the numbers 1, 7, 10, 

 16 form a magic group whose sum is 34, connected cyclically by 

 steps (1,3). Again in the square delineated in figure xviii above, 



