Abakcus
← All articles

Mathematics · Recreational Math · Magic Figures

The Magic Hexagon: 19 Numbers, One Sum, No Rivals

Nineteen numbers, fifteen lines, every one adding to 38. A railway clerk spent 47 years on it, and a proof showed no other magic hexagon can exist.

A honeycomb of nineteen hexagonal cells holding the numbers 1 to 19, arranged so every straight line adds to 38
The magic hexagon: nineteen cells, fifteen straight lines, and every line adds up to 38.

Take nineteen hexagonal tiles and number them 1 to 19. Push them together into a little honeycomb, three cells on each side. Now try to arrange them so that every straight row, in all three directions the honeycomb allows, adds up to the same total. There are fifteen such rows. Most people give up after an evening. One man kept at it, on and off, for forty-seven years.

The answer, when it finally came, turned out to be stranger than anyone expected. There is exactly one way to do it, not counting turning the board or flipping it over. And there is no larger version. Magic squares come in every size you like; magic hexagons come in one. Of all the number puzzles people have built out of grids and stars and triangles, this one stands completely alone.

The puzzle

Nineteen cells, fifteen lines

The rules are short. Each number from 1 to 19 appears once. Each of the five vertical columns must add to the same total, and so must the five rows slanting up to the right and the five slanting down. Play with it below: pick a direction and a line, or just move over the cells.

91118146117158573134219101216

15 + 8 + 5 + 7 + 3 = 38

Choose a direction, then a line, or hover over any cell. All fifteen lines give 38.

Why 38? Add up 1 through 19 and you get 190. The five vertical columns between them use every cell exactly once, so they must split 190 five ways: 190 ÷ 5 = 38. The same argument works for the other two directions. Once you know the target, the puzzle stops being hopeless and becomes merely brutal. The short rows of three cells along the edges are tight, since three numbers have to reach 38 on their own, which pulls most of the big numbers out to the rim and leaves the small ones crowding the middle. The very centre, it turns out, is 5.

1 of 1Up to rotation and reflection, there is a single arrangement of 1–19 that works. Turn and flip it and you get the twelve versions that look different on paper.

1887–1963

A clerk, a lost scrap of paper, and Martin Gardner

The hexagon has been discovered several times by people who had never heard of each other. A German named Ernst von Haselberg found it in 1887. In 1895 William Radcliffe, on the Isle of Man, found it again. Neither discovery travelled far, and the puzzle dropped out of sight.

The rediscovery that stuck belongs to Clifford W. Adams, a clerk for the Reading Railroad in Pennsylvania. Adams started on the problem in 1910, filling sheets with trial arrangements in his spare hours. He got close many times. In 1957 he finally hit on an arrangement where all fifteen lines came out right. He copied it onto a slip of paper, and then he lost the slip.

Adams spent the next few years trying, and failing, to find the arrangement again. Five years later the missing paper turned up, and this time he did not take any chances. He sent it to Martin Gardner, who was writing the Mathematical Games column in Scientific American. Gardner's career as a columnist had begun in 1956 with an article about the hexaflexagon, so a puzzle built from hexagons had come to the right desk.

Gardner passed the hexagon to Charles W. Trigg, a mathematician with a taste for recreational problems. Trigg showed that Adams's solution was not just a solution but the only one. Gardner published the hexagon in August 1963, and Trigg's proof followed in 1964. The puzzle that had slipped away twice was now fixed in print, with a guarantee attached.

Forty-seven years of searching ended in a single arrangement, and a proof that there was never anything else to find.

The proof

Why there are no bigger magic hexagons

A magic square grows happily. You can build one of size 4, 5, 100. So the natural next question was whether a bigger honeycomb, four cells on a side with the numbers 1 to 37, could also be made magic. The surprise is that the question can be settled with a few lines of algebra, before you place a single tile.

Call the number of cells along one edge n. A hexagon of that size holds 3n² − 3n + 1 cells and has 2n − 1 rows in each direction. Repeat the trick that gave 38: add up every number in the board and share it equally among the rows. Rearranged, the magic total M has to satisfy

32M = 72n³ − 108n² + 90n − 27 + 5 ⁄ (2n − 1)

Everything on the right is a whole number except that last fraction. For M to be a whole number, 2n − 1 has to divide 5. That leaves only 2n − 1 = 1, the trivial board of a single cell holding the number 1, or 2n − 1 = 5, which is our honeycomb with three cells on a side. Plug in n = 3 and the formula gives 32M = 1,216, so M = 38. For a board with four cells on a side the target would be about 100.43, which no set of whole numbers can hit.

Tom Vickers published an argument of this kind in the Mathematical Gazette in 1958, and it has been rediscovered by many puzzlers since. What the algebra cannot tell you is whether the one possible size actually has a solution. That part took Adams his half-century and Trigg his patience. Relax the rules, though, and the door opens a little: if the numbers are allowed to be any run of consecutive integers instead of starting at 1, larger magic hexagons do exist.

The family

Magic squares, the oldest relatives

The hexagon belongs to a large and very old family of magic figures. The best known is the 3×3 magic square called the Lo Shu. Chinese legend says it appeared on the shell of a turtle climbing out of the Luo River in the days of the flood-taming emperor Yu, and it has been copied onto charms, compasses and temple walls ever since.

492357816
The Lo Shu. Every row, column and diagonal adds to 15, and up to rotation and reflection it is the only 3×3 magic square there is.

Like the hexagon, the Lo Shu is unique: every 3×3 magic square made from 1 to 9 is the same square turned or reflected. The resemblance stops there. At size 4 there are 880 different magic squares, a count Bernard Frénicle de Bessy published in 1693. At size 5 there are 275,305,224, a number Richard Schroeppel found by computer in 1973. Nobody knows the exact count for size 6; the best estimates run to around 10¹⁹.

The most famous 4×4 square hangs in the corner of Albrecht Dürer's 1514 engraving Melencolia I, with the date of the print hidden in its bottom row. Benjamin Franklin, bored in colonial assembly meetings, built 8×8 squares whose rows bend in V-shapes and still add to 260. And chess puzzlers spent generations hunting for a knight's tour that would also be a magic square. A half-magic tour, where the rows and columns work but the diagonals don't, appeared in 1848. A fully magic one was ruled out only in 2003, by an exhaustive computer search.

The family

Stars, triangles and cubes

Move from grids to stars and the hexagon's fussiness starts to look less unusual. Put the numbers 1 to 10 on the ten points of a five-pointed star, and ask each of its five lines to add to 22. It cannot be done; a computer can check every one of the 3.6 million arrangements in a blink and none of them works. The smallest magic star that exists has six points.

123611712108495
A magic hexagram. The numbers 1 to 12 sit on the twelve points of a six-pointed star, and each of its six lines adds to 26. There are 80 different ways to do it.

Then there are perimeter-magic triangles, where only the sides count. With the numbers 1 to 6 placed on the corners and the middle of each side, every side can be made to add to 9, 10, 11 or 12, depending on how you arrange them. It is the gentlest member of the family and the best one to hand to a child: it takes a few minutes, and the discovery that the small numbers belong in the corners for 9 and the big ones for 12 is a real piece of mathematics.

123645each side = 9
The smallest magic triangle: 1 to 6 on the sides, every side adding to 9. The same six numbers can also be arranged to give 10, 11 or 12 — try it.

Go up a dimension and you get magic cubes. Fill a 3×3×3 cube with 1 to 27 so that every row, column, pillar and the four long diagonals through the centre add to 42. It can be done, and the centre cube is always 14. Pull back further still and magic figures blur into the wider world of recreational mathematics, alongside the curious patterns in interesting prime numbers: problems no one needs solved, which keep turning out to have surprisingly deep answers.

Try it

How to make your own magic hexagon puzzle

The hexagon is a wonderful thing to hold in your hands. Print or draw nineteen hexagons about 4 cm across on card, number them 1 to 19, and cut them out. Then give yourself, or a classroom, a few hints in order of strength:

  1. Every line adds to 38. Work out why before you start.
  2. The six short edge rows have only three cells each, so they need large numbers.
  3. The centre cell is 5.
  4. The six corner cells are 3, 9, 10, 15, 16 and 18.

Most people need the third hint, and almost everyone solves it after the fourth. When you are done, check the explorer above. You will have found the same hexagon Adams found, perhaps turned or flipped, because there is no other one to find.

Sources

  • Martin Gardner, “Mathematical Games,” Scientific American, August 1963.
  • Charles W. Trigg, “A Unique Magic Hexagon,” Recreational Mathematics Magazine, January–February 1964.
  • Tom Vickers, “Magic Hexagon,” The Mathematical Gazette, 1958.
  • Eric W. Weisstein, “Magic Hexagon” and “Magic Square”, MathWorld.
  • Magic hexagon and Magic star, Wikipedia.