# MAGIC CONSTANT GROUPS

The whole point of making magic figures is to arrange numbers in a manner such that the magic constant appears in a predictable way. The nasik order-8 cubes are replete with predictable patterns that add to the magic constant. A few of these are demonstrated in the generators. There are many more. I want to reiterate here that all combinations of nine valid base cubes will add to the magic constant in all the ways mentioned below, but only about 0.93% of the combinations made using base lines are actually magic cubes. The remainder are missing some of the numbers in the 1-512 (or 0-511) set and have other numbers duplicated. Because of the way base line cubes are built it is more important to ensure that all numbers are present than to check for addition sums, however, read the first sentence again.

There are many combinations of eight numbers from the set of numbers from 1 to 512 that add to the magic constant. Since all 512 numbers are present somewhere in the cube, it will be possible to define a pattern created by any of these number combinations. If the magic constant is generated wherever that pattern is placed in the cube (including wraparound and different dimensional arrangements) then that pattern is a magic constant pattern of the cube. A pattern will only be considered in this discussion if it adds to the magic constant when it is translated to all possible positions in the cube in all orientations of the cube. Due to redundancies, this condition may define 64, 128, 256, or 512 different groups of eight numbers for any given pattern in a given orientation. When the pattern is turned in a different orientation relative to the cube, other groups of eight numbers may be defined.

A pattern can often be described in more than one way. In the descriptions below, I attempt to group the patterns into logical sets. Some patterns logically fit into more than one set even though the description of the sets may be quite different. These dualities will be discussed when they occur. Many of the non-trivial patterns discussed below are shown in the 8Groups Excel spreadsheet on the Downloads page.

## CUBE GENERATOR GROUPS

The groups selected for illustration in the Cube Checker section of the Cube Generator were based on extensions to 3-D of the known addition groups in the order-4 pan-magic squares. They are described in more detail in the Magic Cube Guide. The line pattern extends in three directions in the cube rather than the two of the square. Square diagonals and broken diagonals go in six directions rather than two. Extension of the 2-D diagonals to the four 3-D diagonals* and broken diagonals* is obvious. For a nasik magic cube, the above patterns must all add to the magic constant. The other patterns described below are not required but are present in all order-8 nasik magic cubes.

The corners of 2x2 squares in the magic square can be envisaged in two ways in the cube. They can become the corners of 2x2x2 cubes or two 2x2 squares shifted by some vector. If the corners of all 2x2x2 sub-cubes add to the magic sum, then the corners of all 2x2x4 rectangular prisms also add to the magic constant. The proof follows: Let the corners of a 2x2x2 cube in one plane sum to a. Let the other four corners sum to b. Continuing in the same direction to the next plane, the corners of the next 2x2 square sum to c. Continuing one more plane in the same direction the next 2x2 square sums to d. Since all 2x2x2 squares add to the magic sum, S, then a+b = b+c = c+d = S. This means that a = c and b = d. By substitution a+d = S. Since the a and d planes are 4 apart then every 2x2x4 rectangular prism adds to S. By a similar argument every cube and rectangular prism with even numbered sides adds to S. Using the same logic if the corners of every 3x3x3 cube add to a constant then the corners of every 7x7x7 cube also add to that constant, etc.

The converse of the above proof is also possible for order-2p figures. If, for instance, the corners of all 4x4x4 sub-cubes in an order-8 cube add to S then by the above proof the corners of all 8x8x8 sub-cubes also add to S. Since the corners of an 8x8x8 sub-cube in an order-8 cube are identical to the corners of a 2x2x2 sub-cube then if the corners of all 4x4x4 sub-cubes add to S, the corners of all 2x2x2 sub-cubes must also add to S. If the corners of all 6x6x6 sub-cubes add to S then the corners of all 24x24x24 sub-cubes add to S and these are equivalent to the corners of 2x2x2 sub-cubes in an order-8 cube. The 24x24x24 size in an order-8 cube is possible due to wraparound. Alternatively the cube can be replicated in all directions filling all space and it can be seen that the number that is 25 in one direction is identical to the number that is 1 in the other. Aale de Winkel has pointed out that this converse proof works for figures of order-2p but not for figures of other sizes.

Two 2x2 squares separated by a (0,0,1), (4,4,0), (4,4,2), (0,0,3), or (4,4,4)* vector always add to S. The first vector makes the 2x2x2 cube, the fourth a 2x2x4 rectangular prism. The vectors were determined by testing all possible shifts of the second square in the same plane direction. Using an argument similar to that for the 2x2x2 cubes, the squares can be even sided rectangles of any size when both rectangles are the same dimensions in the same directions.

The corners of 3x3x3 and 5x5x5* sub-cubes also always add to S. This expansion of square analogs in the cube is part of the reason there are so many patterns in the cube that add to the magic constant. Barnard 1 first described the corners of cubes and rectangles adding to the magic sum but did not describe shifted squares or any of the other patterns discussed below. A special case of shifted squares has sometimes been described as the middle two number of each of the four sides of the squares of the cube. Other patterns described below have not been described elsewhere.

Shifted lines are the final type of group extended to the cube in the cube generator. The cube generator just shows a section of four numbers in a line with the other four numbers shifted by a vector. As an example the second four numbers of a shifted row can be shifted a (4, 4, 0), (0, 2, 2), or (4, 4, 4)* vector from the first four numbers. The concept was extended to shifted diagonals* in the generator but this could be considered a different type of pattern.

## OTHER GROUPS

The complement or inverse of every number in the cube is located a (4,4,4) vector away. A number plus its inverse adds to 1/4 of the magic constant. Therefore, a group composed of any four numbers in the cube plus their inverses will add to the magic constant and the patterns created by these groups will translate throughout the cube generating the magic constant. At most there are 256x255x254x253 different combinations of this type, but duplication of patterns reduces this number considerably. For the most part these patterns will be difficult to describe. Only a few of the patterns shown in the cubes CHECKER are of this type. The cubes diagonals and the shifted diagonals are the major examples. No additional specific trivial examples will be considered below although they may be mentioned as completing a series of patterns. Many patterns in the cube that add to the magic constant are neither the trivial cases discussed above nor the cases shown in the cube generator. Many of these can be described as alterations of groups described in the cube generator but most have different progenitors.

A program was written to determine groups that could be translated throughout the cube always summing to the magic constant. Because looking at all 512*511*510*509*508*507*506*505 possible patterns was deemed impossible, an assumption was made. It was assumed that a pattern could be defined by two groups of four numbers that were shifted by a (x,y,z) vector. As mentioned above the (4,4,4) vector gives the trivial case, so it was excluded. The program was designed to produce only unique patterns. The final version of the program produced 229 unique solutions. On examination of these, it was found that there were patterns of four that often appeared. These patterns led to still more and finally to a relatively simple description of all groups. Only 43 of these original 229 patterns are not members of the dotted diagonals and tetrahedral corners sub-groups described below. Many of the cube generator groups are in this initial set and the remainder belong in the PairMove category described below.

### Dotted Diagonals

 256 385 127 258 253 388 126 259 192 449 63 322 189 452 62 323 161 480 34 351 164 477 35 350 225 416 98 287 228 413 99 286 272 113 399 242 269 116 398 243 336 49 463 178 333 52 462 179 337 48 466 175 340 45 467 174 273 112 402 239 276 109 403 238

Most of the patterns found in the initial scan are not easily described at first glance. One notable exception is the dotted diagonals. A dotted diagonal consists of every other member of either a square or a cube diagonal or broken diagonal. Two examples are shown at right. The dotted cube diagonals are of course trivial for a group of four because the first and third members and the second and fourth members are each a (4, 4, 4) vector apart.

Any pair of dotted diagonals in the cube will always add to the magic constant. Combining the yellow and green groups at right creates one such pattern. This is because every dotted diagonal adds to one half of the magic constant, S/2. This leads to a group of semi-trivial patterns: a group composed of a 2-D dotted diagonal and two numbers with their complements that are located a (4,4,4) vector away, will always add to the magic constant. In a separate search, it was found that there are 1310 unique semi-trivial examples of this type but they are not show in the download. The search also found 153 non-trivial patterns that are shown in the 8Groups download under the dotted tab.

It needs to be noted that the order-4 pan-magic squares also have dotted diagonals* that add to the magic constant. These are just a number and its complement located a (2,2) vector away in the square. Higher order figures of n-dimensions and order-2n also have dotted diagonals that always add to 1/2 of their magic constant.

### Tetrahedral Corners

 e -- 267 -- -- -- -- -- -- -- -- -- -- -- -- -- 469 -- g -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 256 -- b -- -- -- -- -- -- -- -- -- -- -- -- -- d -- 34 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Designate the numbers in the corners of a 3x3 square a, b, c, and d and the numbers in the corners of a second 3x3 square located a (0,0,2) vector away e, f, g, and h where a and e are the upper left corners of the respective squares and the squares are lettered in a clockwise direction. Then a+c+f+h = b+d+e+g = S/2. These two sets of four corners of a 3x3x3 cube describe mutually exclusive tetrahedrons. This leads to a second set of semi-trivial patterns composed of tetrahedral corners of a 3x3x3 cube and two numbers with their complements. In a search excluding dotted diagonals, it was found that there are 1487 unique examples of this semi-trivial type. The search also found 92 non-trivial patterns shown in the 8Groups download under the tetrahedra tab. These examples do not include those that have both dotted diagonals and tetrahedron corners. Those are included with the dotted diagonals.

Designate the numbers in the corners of a 5x5 square a, b, c, and d and the numbers in the corners of a second 5x5 square located a (0,0,4) vector away e, f, g, and h where a and e are the upper left corners of the respective squares and the squares are lettered in a clockwise direction. Then a+c+f+h = b+d+e+g = S/2. These two sets of four corners of a 5x5x5 cube describe mutually exclusive tetrahedrons. This leads to a third set of semi-trivial patterns composed of tetrahedral corners of a 5x5x5 cube and two numbers with their complements. A search excluding those also containing dotted diagonals and 3x3x3 cube tetrahedral corners found only 302 unique examples of this semi-trivial type. There are 11 non-trivial patterns shown in the 8Groups download under the tetrahedra tab. These examples do not include those that have both dotted diagonals and tetrahedral corners of 5x5x5 cubes or those that have both tetrahedra from 3x3x3 and 5x5x5 cubes. Those are included with the dotted diagonals and 3x3x3 cubes tetrahedra examples.

### Pair of Numbers with Sums Identical to Other Pairs of Numbers a Fixed Vector Away

One additional search for patterns besides those discussed above was conducted. This search made with the assumption that there were two independent groups of four that make up the 8 numbers that translate throughout the cube. The groups of four are independently composed of pairs of numbers separated by different vectors. It was possible to find all such groups after about a days run time. There were 12 additional patterns found by this search.

Of the non-trivial patterns found from all the searches, the above described groups account for 269 of the 311 patterns identified. All but three of the remaining 42 patterns can be derived from the previously described patterns by moving pairs of numbers to certain equivalently valued positions. There are pairs of numbers within the cube that are equivalent to and at a fixed vector away from other pairs of numbers within the cube. These pairs were found by exhaustive search. The pair pairs are described below.

1. Designate the numbers in the corners of a 5x5 square a, b, c, and d and the numbers in the corners of a second 5x5 square located a (2,2,4) vector away e, f, g, and h where a and e are the upper left corners of the respective squares and the squares are lettered in a clockwise direction. Then a+c = b+d = e+g = f+h.
2. Designate the numbers in the corners of a 3x3 square a, b, c, and d; the numbers in the corners of a second 3x3 square located a (0,0,4) vector away e, f, g, and h; and the numbers in; the corners of a third 3x3 square located a (4,4,2) vector away i, j, k, and l; where a, e, and i are the upper left corners of the respective squares and the squares are lettered in a clockwise direction. Then a+c = e+g = j+l and b+d = f+h = i+k.

By replacing selected pairs of numbers with their equivalent pairs from above, 39 of the remaining 42 patterns can be accounted for. The PairMove tab in the 8Groups download gives all the patterns identified by this process with a reference to a possible progenitor.

An examination of all of the identified patterns reveals that many of them can be converted to other patterns using the tactics used to justify the patterns in the PairMove category. It would be possible to identify a small number of primary patterns from which all the others could be made by appropriate PairMove events. For instance, the tetrahedral corners sets of both sizes identified above can be made by a PairMove of the appropriate dotted lines.

There are three groups for which I was unable to determine a path to one of the known patterns although it is easy to convert them to each other. They are shown under the Others tab. but they may belong under the PairMove tab assuming an appropriate path can be found.

There may be groups that have been missed in this survey, but, as mentioned above, it will be very difficult to check all such possibilities. I have exhaustively checked for additional groups residing in just the first four squares and found none.

### Groups of Four Numbers

It should be obvious from the discussion above that most of the groups of eight numbers that add to the magic constant, S, are composed of two groups of numbers that add to S/2. It is much simpler to just describe the groups of four numbers adding to S/2 and not attempt to describe all their possible combinations. The groups of eight that are not composed of two groups of four need to be described separately. There are just eight of these groups of four numbers. They can all be generated by shifting pairs of numbers from the dotted line group of four. These eight groups are shown under the 4-Groups tab in the 8Groups download.

The obvious groups of eight not made from groups of four are the agonals of the cube and the corners of sub cubes with even numbered sides such as the 2x2x2 sub cubes. The examples under the Others tab and some under the PairMove tab in the 8Groups download are bona fide groups of eight.

*A trivial example based on complementary pairs spaced a (4,4,4) vector apart.