Categories
Coding Science

Is it possible to arrange 9 numbers that are 9 letters long into a magic square?

No. (sorry)

Code below brute-forced all 180,503,769,600 possible magic squares [wikipedia]. It took 1.5 days run 10 processes on Aalto University’s light calculation server. The numbers is question are: 17, 21, 22, 26, 31, 32, 36, 44, 45, 49, 54, 55, 59, 64, 65, 69, 81, 82, 86, 91, 92, and 96.

Turns out the answer is no combination of those numbers forms a magic square. There’s probably a neater way to prove this but here we are.

To run this on your own machine, save it and then enter:

$ python3 main.py multi gilead

Leave a Reply

Your email address will not be published. Required fields are marked *