154 



MAGIC SQUAEES 



[CH. VII 



illustrate the theory. From the above relations it follows that 

 we cannot have pqa(k-b) = pqb (h — a), that is, pq (ak — bh) = 0. 

 Therefore ak — bh cannot be a multiple of n, that is, it must be 

 prime to n. If this condition is fulfilled, as well as the other 

 conditions given above, each cross-step (h, k) can be made in 

 due sequence, and the square can be constructed. The result 

 that ak — bh is prime to n shows that the cross-step (h, k) must 

 be chosen so as to take us to an unoccupied cell not in the same 

 row, column, or diagonal (broken or not) as the initial number. 

 By noting this fact we can in general place any two given 

 numbers in two assigned cells. 



There are some advantages in having the cross-steps uniform 

 with the other steps, since, as we shall see later, the square can 

 then be written in a form symmetrical about the centre. This 

 will be effected if we take h = — b,k = a. If n is prime our 

 conditions are then satisfied if b be any number from 2 to 

 (« — 1)/2, if a be positive and less than b, and if a" + 6 2 be prime 

 to n. We can, if we prefer, take h = b, k = — a; but it is not 

 possible to take h = a and k = — b, or h = — a and k = b, since 

 they make u = or v = 0. 



For instance, if we use a knight's move, we may take a= 1, 

 6 = 2. The square of the seventh order given below (figure xviii) 



Figure xviii. A Pandiagonal Symmetrical Square, n=7. 



is constructed by this rule. But in the case of a square of the 

 fifth order we cannot use a knight's move, since, if a = 1, and 

 b = 2, we have a? + b* = 5. Hence the use of a knight's move is 

 not applicable when n is 5, or a multiple of 5. 



