Office Applications and Entertaiment, Magic Squares Form16 About the Author

 Most Perfect Magic Squares 16 x 16, Interactive Solution based on Basic Pattern Method Introduction The Basic Pattern Method as applied in in Form12 can also be used to construct 16 x 16 Barink Squares (ref. Section 12.5). A 16 x 16 square A - composed of 16 identical Pan Magic Squares of the 4th order - can be combined with two fixed 16 x 16 grids G1 and G2 which can be viewed in the form below by pressing the buttons 'Shw G1' or 'Shw G2'. This method is based on the hexadecimal representation n = ai + 16 * m of the numbers n = 1 ... 256 with ai = 1 ... 16 and m = 0 ... 15, which can be rewritten as n = ai + 16 * g1 + 64 * g2 with gi = 0, 1, 2, 3 for i = 1, 2. Based on the 384 possible Pan Magic Squares of the 4th order, Most Perfect Magic Squares of the 16th order can be obtained by executing the matrix operation MP = A + 16 * G1 + 64 * G2. The construction method described above has been applied in following Interactive Solution:

Select A

 H1a H1b H2a H2b V1a V1b V2a V2b 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

 a244 a248 a252 a254 a255 a256 a240 a192 a128 a64
 Procedure (Hand): Select 4 Binaries out of the pairs H1a/H1b, H2a/H2b, V1a/V1b and V2a/V2b with the 4 upper left selection buttons. Select a sequence (1, 2 ... 24) for the four selected Binaries with the selection button left of the button ‘Shw A’ and confirm by pushing the button ‘Shw A’ (for details regarding solutions based on Binary Matrices refer to Form4b). Press the button ‘Calculate’ to validate the selection and to calculate and visualise the resulting Most Perfect Magic Square of the 12th order, based on the selected Pan Magic Square and the Pre Programmed Grids G1 and G2. Procedure (Automatic): Built a Most Perfect Magic Square as described above, and validate the square by pressing the button ‘Calculate’. If you press the button ‘Report’, with all 10 Check Boxes checked (default), the report will contain only the Most Perfect Magic Square shown in the form. By un checking more and more Check Boxes before pressing the button ‘Report’, more and more Most Perfect Magic Squares will be generated. Be careful with un checking to many Check Boxes, it might cause a time out error on your computer. The algorithm used to generate the Magic Squares automatically is described in Section 12.5.2 and is based on the principle of Conditional Sequential Searching. At start all independent variables have the value resulting from the constructed Most Perfect Magic Square in the form. By un checking a Check Box, the related independent variable will vary between 1 and 256. With the Check Boxes for the variables a(256) = 106, a(255) = 147, a(254) = 61, a(252) = 58 and a(240) = 159 checked, 384 Most Perfect Magic Squares will be generated which are shown in Attachment 12.5. Have Fun!