Magic hexagon

A magic hexagon is a hexagonal array of numbers, wherein the sum of all the rows in the three directions in each case result in the same value. It is particularly important, analogous to the magic square integers, starting from 1, to be arranged in the hexagon, that the sums of all the rows are the same. Apart from the trivial case where the hexagon consists of only one number, this is only possible with the page length.

Task

A hexagon with sides of length contains numbers and the direction rows. The identical sum of each row is called a magic number. For the unknown numbers of the hexagon and the magic number to pop up a system of linear equations are set up. If we let any integers as a solution to the system of equations is always solvable, but not unique.

As a restriction required that the solution numbers are consecutive integers. In particular, a solution with the natural numbers from 1 is searched. Solutions that can be converted by rotations and reflections of the hexagon are each other, thereby counted as a solution.

Solution with the natural numbers from 1

A solution in which the integers from 1 up to the hexagon are located only exists for the trivial case, and for. In the second case the hexagon fields and the sum of the numbers in each row has is. For this purpose, there is exactly one solution that has been found several times since the late 19th century.

To derive, for which solutions exist, first the sum of the numbers of the hexagon, i.e. the numbers from 1 to be calculated. With one obtains:

The sum of the numbers in a row is obtained by dividing this total by the number of rows:

If this equation is multiplied by 32:

Is left is an integer. This means that the right side is an integer, must be an integer. This is possible only for or only.

Solution with consecutive integers

If you leave any consecutive whole numbers to solution, there are generally for more solutions. For the sum necessary to use a number range from to. For other sums arising with the exception of the following number ranges:

A formula that gives the maximum and minimum for each, for which a solution exists is not yet known.

In case there is no solution.

The solution illustrated in the above figure for the corresponding value. There is also at these number ranges Solutions:

  • 001-19 with the sum of 038: 01 solution
  • 0-4 to 14 with the sum of 019: 36 solutions
  • 0-9 to 09 with the sum of 000: 26 solutions; which can be transformed into one another by 14 solutions complete change of sign; remaining 12 corresponds to a complete change in the sign of rotation of 180 degrees. The result is 12 7 * 2 ( = 26) solutions.
  • -14 To 04 -19 with the sum: 36 solutions (all sign to solution changed with sum 19)
  • -19 To -1 with the sum -38: 01 solution (all sign to solution with sum 38 changed)

In case there are no solutions for. A solution for the sum is (a second solution is obtained by a change of sign of all numbers in hex ​​):

-17 13 14 -10       18 -6 -8 -4 0     17 -15 3 -12 6 1 -18 -7 -9 12 8 5 9     15 -16 7 11 -14 -3       16 2 -11 -2 -5        -13 4 10 -1 Symmetric ( sign change is equivalent to a 180 degree rotation) hexagons of this size, there are a total of 3,626,672 pieces.

For n = 5, there are only solutions for i values ​​from -5 to 5 A solution for i = 5 ( figures from 15 to 75, total 305):

55 68 71 59 52        60 47 42 46 48 62      73 41 23 29 26 39 74    61 43 33 18 17 31 36 66 56 37 22 21 16 19 25 51 58    69 44 30 15 20 28 34 65      70 45 24 32 27 35 72        57 54 38 40 49 67          53 64 75 63 50 For this speed range, there is only solutions with the 15 or 16 as a figure in the middle.

539506
de