I began my research into the hexagon using pencil and paper. I painstakingly drew triangular grids, then plotted positions for each number, one after the other. Friends took notice and intervened.
The first, Paul Jacobson, intervened to prove me wrong. He wrote a quick script to show where the first prime would break out out of the hexagon. I suspect his thinking was to disprove the hexagon so Tad could go look for a real job. After several hundred million positions, no numbers left the hexagon, and he let it go.
A third friend, Perry Stoll, looked at my code – and once he’d stopped laughing and had dried his eyes – cleaned it up, integrated Numpy, Cython and the extraordinary prime sieve developed by Kim Walisch. The code is brilliantly fast now and can go as high as one has time to calculate. It can be found on my page on github. I’ll be forever grateful for Perry’s assistance in building primesieve.py — and for the many nights we drank home brew and coded and marveled at how things worked.
While I’m at it I should give a shout out to my brother, Darrell Gallion, who offered clues along the way, tweaked some code and pointed me toward the prime sieve.
If you or someone you know is good with python, C++, GPU programming, or has access to a supercomputer, let me know as there is much more to be done.