GPT-5.6 Sol helps prove magic hexagons exist for every order above 3
A magic hexagon applies the idea of a magic square to a hexagonal grid: numbers fill the cells so every straight line in three directions sums to the same total. A normal magic hexagon, one filled with consecutive numbers starting at 1, exists for exactly one order, order 3, with 19 cells; a divisibility argument rules out every other order. Relaxing the rule so the numbers only have to be consecutive, not starting at 1, produces abnormal magic hexagons, which are far harder to find because there is no formulaic construction, only brute-force search through an enormous space of arrangements. Before this project, the largest known abnormal magic hexagon was order n=9, found by Klaus Meffert in 2024.
The author narrowed the search by restricting it to antisymmetric hexagons, where opposite cells hold opposite values around a zero center, and by developing a "potential field" representation in which every line sum is zero by construction, shrinking the space of arrangements that need to be checked. Using GPT-5.6 Sol to write a custom simulated-annealing solver, tuned over several rounds with Numba for the hot loops and perf-guided fixes to memory allocation and random-number generation that together squeezed out another 50% of performance, the author ran the search across roughly 24 CPU cores on a home server for a few days. It found new abnormal magic hexagons for every order up to n=21.
The run of successes suggested a stronger claim: that abnormal magic hexagons exist for every order above 3. The author tried to prove it with two AI systems, GPT-5.6 Sol and the Lean-oriented theorem-proving agent Aristotle, working in parallel. Progress repeatedly stalled, and even a long run of GPT-5.6 Sol in its highest reasoning mode failed to close the gap, though it left behind partial ideas. In a later session, GPT-5.6 Sol combined those leftover ideas into a constructive proof covering every order n>800 divisible by 16. Further iteration generalized the construction step by step, first dropping the divisibility requirement, then pushing the proved threshold down from 800 to 114.
Combined with the brute-force solutions found earlier up to order 21, the construction and the finite witnesses together cover every order n>3, closing the open question. The result is constructive: it gives an algorithm for building the hexagons rather than only asserting they exist. The author notes the proof has not been formalized in the Lean proof assistant and has not been independently verified, calling that the natural next step.
Key facts
- Before this work, the largest known abnormal magic hexagon was order n=9, found by Klaus Meffert in 2024.
- Using a custom simulated-annealing solver written with GPT-5.6 Sol and run across roughly 24 CPU cores for a few days, the author found abnormal magic hexagons for every order up to n=21.
- Working with GPT-5.6 Sol, and in a parallel attempt with the Lean-oriented proving agent Aristotle, the author built a constructive proof; the provable threshold fell from n>800 (divisible by 16) to n>114 with no divisibility restriction.
- Combined with the brute-force solutions up to n=21, the construction covers every order n>3.
- The proof has not been formalized in Lean and has not been independently verified.
Why it matters
Abnormal magic hexagons had resisted a general construction for decades; only a handful were known, and finding each one meant a fresh brute-force search. This work closes the question for every order above 3 with an actual constructive algorithm, not just an existence claim, and it does so through an unusually visible collaboration: an AI model wrote and optimized the search code, then combined its own earlier partial ideas into the key proof step after a human-directed proving agent, working the formal route in Lean, stalled.
Who it affects
Mathematicians and puzzle enthusiasts who track magic-figure constructions gain a new general result and a working algorithm. The account also matters to anyone following AI-assisted mathematics: it is a concrete case of a general-purpose model, rather than a specialized theorem prover, driving a proof to completion after a dedicated formal-proving agent could not.
How to use it
The work is published as a blog post at gukov.dev, including the reasoning, the solver approach, and interactive visualizations of the hexagons and their potential fields; there is no product or service attached. Readers wanting to verify or extend the result would need to check the construction themselves, since it has not yet been formalized or independently reviewed.
How solid is it
The brute-force solutions up to order 21 are concrete, computed artifacts that can be checked directly. The general proof for every order above 3 is a different matter: it emerged from an extended, iterative back-and-forth with GPT-5.6 Sol after both that model and the Aristotle proving agent initially got stuck, and the author states plainly that it has not been formalized in Lean and has not been independently verified.
Risks and caveats
The central claim rests on an unverified proof produced with heavy AI assistance, including a case where the model synthesized a breakthrough step from ideas it had generated in an earlier, failed attempt. Until the argument is formalized in Lean or checked by other mathematicians, it should be read as a strong, carefully reasoned claim rather than an established theorem.
“My main takeaway was that LLMs can be unusually effective at developing domain-specific solvers, leaving general-purpose tools such as Z3 and OR-Tools far behind.”
— the blog's author