Searching for the magic hexagon

In the same way that there are magic squares, where every row and column add up to the same sum, it turns out there is also exactly one (non-trivial) magic hexagon. Although this solution can be worked out mostly by hand, it was interesting to explore the different approaches to writing code to search for it. An initial unthinking version would have taken 8,000 years to run, but a series of improvements brought this down considerably:

Graph of improvement in run time.

See the full write-up on GitHub. (Code is also available there.)