## Magic Squares

Question 1. The base line 0101 can be combined with either 0011 or 0110. If base lines starting with 1 are included then 0101 or 1010 must be one of the base lines and 0011, 0110, 1001, or 1100 must be the other.

Question 2. These seven multiplier orders give different aspects of the square that was originally represented (i.e. 2184); 1248, 1284, 2148, 4812, 4821, 8412, and 8421. The eight aspects of a second magic square are 1428, 1482, 2814, 2841, 4128, 4182, 8214, and 8241. The eight aspects of the third magic square are 1824, 1842, 2418, 2481, 4218, 4281, 8124, and 8142. One example from each set is sufficient answer.

## ORDER-2p SQUARES

Question 1. This feature was not planned and was just noticed in one of the squares I created. Look at the four numbers at the corners of the 3x3 square in the upper left corner of the magic square. They are 1, 2, 3, and 4. There is a second 3x3 square that has at its corners the 5, 6, 7, and 8. The 9, 10, 11, and 12 are at the corners of a 3x7 square but with wrap around that also could be a 3x3 square. Continuing, all 4 number sets beginning at 4n + 1 are also at the corners of 3x3 squares or their wrap around equivalents.

Question 2. The sequence 123564 will give numbers spaced 2 apart. The sequence 125634 will give numbers spaced 4 apart. The sequence 156234 spaces the numbers 8 apart. The sequence 561234 will space the numbers 16 apart. The key is the position of the 5 and 6. Their order can be reversed in each set. The order of the other four numbers does not matter.

To understand how this works a 1 must first be subtracted from all the numbers to make the analytic square. Then the numbers must be converted to binary. After this is done, look at just the last two bits of any of the groups of consecutive numbers in the 2x2 or 3x3 squares. In each set, there is a 00, a 01, a 10, and a 11. Now look at the first four digits in each group. They are all the same for that group. Numbers spaced 2 apart must end in 000, 010, 100, and 110 or 001, 011, 101, and 111. These are 0, 2, 4, and 6 or 1, 3, 5, and 7 in base ten. The other three bits will just add a constant to these sets. Exchanging the 4th (either all 0's or all 1's for a group) and 6th base squares will change the ending of all groups to one of these forms. (The order 123564 will also work for the same reason.)

Spacing the numbers four apart just requires that the last two bits of the initial numbers become the middle two bits of the changed numbers while the remaining bits in each set remain identical. Each group of four can be originally designated wxyz00, wxyz01, wxyz10, and wxyz11. They must become wx00yz, wx01yz, wx10yz, and wx11yz. In base ten, the initial number set is 0, 1, 2, and 3 plus the wxyz constant. The final number set is 0, 4, 8, and 12 plus the wx and yz constants. Exchange the 4th and 6th and the 3rd and 5th base squares to get the spacing of 4.

Spacing the numbers 8 apart by the same logic requires exchanging the 3rd and 6th and the 2nd and 5th base squares. Spacing the numbers 16 apart by the same logic requires exchanging the 2nd and 6th and the 1st and 5th base squares.

Question 3. The Base Square Order that gives the desired 4x4 pattern is 1, 2, 3, 4, 6, 8, 5, and 7. Base squares 1, 2, 3, and 4 can be shuffled in any order to also give a valid answer as long as they occupy just the first four positions.

The last four base squares control the numbers from 1-16 in the 4x4 square in the upper left corner. Those numbers will remain in the upper left corner in the same configuration no matter how the first four base squares are arranged. The numbers in the 2x2 square in the upper left corner are 1, 3, 2, and 4 or 00000000, 00000010, 00000001, and 00000011 in binary as analytic numbers. Exchanging the last two digits of each binary number will change them to 00000000, 00000001, 00000010, and 00000011. This will be 1, 2, 3, and 4 in decimal after adding 1 to each value to convert them to the traditional range. The digit exchange is accomplished by swapping the 7th and 8th base squares.

After the above rearrangement, the first two rows of 4 numbers are 1, 2, 9, 10, and 3, 4, 11, 12. In binary as analytic numbers, they are 00000000, 00000001, 00001000, 00001001 and 00000010, 00000011, 00001010, 00001011. Exchanging the 5th and the 7th bits in every binary number above will change them to 00000000, 00000001, 00000010, 00000011 and 00001000, 00001001, 00001010, 00001011. This can be accomplished by swapping the 5th and 7th base squares. (Remember that the base square numbered 8 actually controls the 7th bit after the first move.) The first two rows of 4 numbers will then be 1, 2, 3, 4, and 9, 10, 11, 12.

The second and third rows of 4 numbers are now 00001000, 00001001, 00001010, 00001011 and 00000100, 00000101, 00000110, 00000111. By exchanging the 8 and 6, (These now control the 5th and 6th bits.) the rows are reversed to give the desired arrangement. The Base Square Order that gives the desired 4x4 pattern is 1, 2, 3, 4, 6, 8, 5, and 7. All the other 4x4 squares also have sequential numbering but not necessarily starting at the upper left corner of their 4x4 group.

The inlaid squares that were present for the initial square will still be valid for the modified square. Shuffling does not change the result even when the 2x2 and 4x4 blocks have been dispersed. Likewise with all the other features. These features are present in all the base squares and it does not matter what order they are in.

## ORDER-3 SQUARES

Notice first the base line pairs for the two base squares. As initially shown the first pair has both base line sets in mod 3 ascending order, 120 and 120. The second pair has one in ascending and the other in descending mod 3 order. This is necessary for the construction of the magic square.

A simple way to make the other 7 aspects by modifying the base lines starts from the initial square given. Reverse the two base lines of one base cube. This will flip the square around one of the diagonals. If the other pair of base lines were reversed the square would be flipped around the other diagonal. If all four base lines are reversed, the magic square will appear to have rotated 180°. The other four aspects are obtained by exchanging the pairs of base lines. This could also be looked at as exchanging the multipliers for the two base squares.

The solution set above often generates master base lines that do not have 0's. The base line pairs can be changed so that the resulting magic square is unchanged but the master base lines have 0's. Below are the base lines as generated above and their conversion so that 0's appear in the base lines.

1. Initial 120, 120 and 210, 201 becomes 201, 012 and 102, 012 as explained on Order-3p Squares.
2. Second base line set reversed 120, 120 and 012, 102 becomes 201, 012 and 012, 102.
3. First base line set reversed 021, 021 and 210, 201 becomes 210, 102 and 210, 201.
4. Both base line sets reversed 021, 021 and 012, 102 becomes 102, 210 and 201, 210.
5. Exchange base line sets 210, 201 and 120, 120 becomes 102, 012 and 201, 012.
6. Exchange sets and second base line set reversed 012, 102 and 120, 120 becomes 012, 102 and 201, 012.
7. Exchange sets and first base line set reversed 210, 201 and 021, 021 becomes 210, 201 and 210, 102.
8. Exchange sets and both base line sets reversed 012, 102 and 021, 021 becomes 102, 201, 210 and 210.

## PRIME ORDER SQUARES

Only the base lines 01234 or 04321 coupled with 02413 or 03142 will produce base squares that are building blocks for order-5 pan-magic line squares. Shifted versions of these also work but I prefer to have a zero at the upper left corner. Other sequences of the five digits like 01423 cannot be used as base lines as they will not generate a valid square. The two viable series can be written as x mod 5 and 2x mod 5 for any five consecutive values of x (ascending or descending). I prefer to start the series with 0 but that is not a requirement.

The example shown has 01234 as the row base line for both base squares. For the column base lines the other possible base line is used, a forward sequence in one and a backward sequence in the other. A second pan-magic square is created when the 01234 and 04321 sequences are used for the two rows and 02413 for both columns. All other combinations that have the 01234 (and/or 04321) sequence for both rows or both columns will have 02413 (and/or 03142) for the other and they will just be different aspects of the same square or invalid.

Putting the 01234 in one row and the 02413 in the other row allows the creation of the other two unique magic squares. One is created by opposing the rows above with 02413 and 01234 in the columns. All sequences increase in the same direction for this square. For the last pan-magic square the same two row base lines are opposed by 03142 and 04321, reversed lines. All other combinations are different aspects or invalid.

The hint to make the associated square should suffice. By translating any valid magic square so that one of the 2's is in the center of the base square it becomes associated. Do it to both and the magic square is associated (12340 and 02413 in the first base square and 40123 and 03142 in the second is an example). Given my proclivity to place the zero in the upper left corner, the search is somewhat harder, but 02413 and 04321 for one and 04321 and 02413 for the other will work.

## ORDER-3 CUBES

There are many possible answers that will give one of the 48 possible aspects of the remaining three cubes. The most important hint was the first one. In order to get a 2 in the upper left corner of the top square of the magic cube, the 1 initially at that position must be increased by 1. Increasing the number by 1 only requires a change in the third base cube. The 0 in the upper left corner must be changed to a 1. Entering the codes; row = 2 0 1, column = 2 0 1, and pillar = 0 1 2, will accomplish that while leaving a 1 in the central position of the third base cube.

In order to get a 4 in the upper left corner of the top square of the magic cube, the 1 initially at that position must be increased by 3. Increasing the number by 3 only requires a change in the second base cube. The 0 in the upper left corner must be changed to a 1. Entering the codes; row = 2 0 1, column = 2 0 1, and pillar = 0 1 2, will again accomplish that while leaving a 1 in the central position of the second base cube.

To get a 6 in the upper left corner of the top square of the magic cube requires changing two base cubes. The upper left corner of the second cube must be increased by 1 and the upper left corner of the third cube must be increased by 2. Entering the codes; row = 2 0 1, column = 2 0 1, and pillar = 0 1 2, again accomplishes that for the second base cube. Changing the pillar base code for the third base cube to 2 1 0 without changing the row and column codes will accomplish the change for the third base cube.