Searching for a 6×6 additive-multiplicative magic square
Is there a 6×6 square of 36 distinct positive integers whose six rows, six columns and two diagonals all have the same sum S and the same product P? Such squares are known for larger orders, but none is known for order 6. This is a computer search for one.
No such square has been found so far. The search has found 1 503 near misses: squares in which all rows, all columns and the main diagonal have the same sum and the same product. Only the anti-diagonal fails.
In a few cases, only one of the 28 conditions in total (14 products, 14 sums) could not be met.
The closest squares
In each square, rows and columns are arranged so that the highlighted anti-diagonal is the one described. All 13 other lines have exactly the sum S and the product P.
27 of 28 conditions met
26 near misses have an arrangement whose anti-diagonal has the exact sum S, 5 one whose anti-diagonal has the exact product P, none both (both would be a full square). These are the results closest to a full square.
Exact anti-diagonal sum
The sum is right; among all such squares this product comes closest.
| 40 | 96 | 150 | 182 | 441 | 108 |
| 312 | 56 | 245 | 270 | 54 | 80 |
| 98 | 432 | 234 | 48 | 100 | 105 |
| 75 | 63 | 288 | 315 | 224 | 52 |
| 168 | 195 | 72 | 42 | 120 | 420 |
| 324 | 175 | 28 | 160 | 78 | 252 |
- P
- 4 992 938 496 000
= 212 · 37 · 53 · 73 · 13 - S
- 1017
- Anti-diagonal sum
- 1017 (exact)
- Anti-diagonal product
- 5 093 670 666 240 (+2.02 %)
Exact anti-diagonal product
The product is right; among all such squares this sum comes closest.
| 77 | 150 | 384 | 231 | 486 | 280 |
| 275 | 144 | 90 | 224 | 308 | 567 |
| 288 | 539 | 360 | 100 | 189 | 132 |
| 140 | 315 | 462 | 432 | 160 | 99 |
| 504 | 108 | 165 | 126 | 385 | 320 |
| 324 | 352 | 147 | 495 | 80 | 210 |
- P
- 139 418 205 696 000
= 212 · 38 · 53 · 73 · 112 - S
- 1608
- Anti-diagonal sum
- 1582 (-1.62 %)
- Anti-diagonal product
- 139 418 205 696 000 (exact)
Closest overall
Getting one of the two values exactly right can leave the other well off: by 2.02 % and 1.62 % in the squares above. This square has neither exactly right, but misses the sum by only 0.21 % and the product by only 0.25 %. The larger of these two deviations is the smallest of all near misses.
| 48 | 198 | 200 | 175 | 273 | 72 |
| 225 | 104 | 165 | 36 | 240 | 196 |
| 110 | 360 | 105 | 120 | 63 | 208 |
| 156 | 150 | 336 | 189 | 80 | 55 |
| 315 | 84 | 52 | 160 | 220 | 135 |
| 112 | 70 | 108 | 286 | 90 | 300 |
- P
- 6 538 371 840 000
= 211 · 36 · 54 · 72 · 11 · 13 - S
- 966
- Anti-diagonal sum
- 964 (-0.21 %)
- Anti-diagonal product
- 6 554 832 076 800 (+0.25 %)
All near misses
Download all 1 503 near misses (CSV), sorted by the larger of the two deviations. Each square is shown in its closest arrangement, or, if it has one, in the arrangement with the exact anti-diagonal sum or product. One square per row: rank, P and its factorization, S, the sum and product of the anti-diagonal with their deviations in percent, then the 36 entries row by row as a11 to a66.
Computing time so far
| Machine | Search time | Used | GHz-hours |
|---|
| Desktop PC, Intel Core Ultra 7 265KF | 274 h | 19 threads | 20 900 |
| Mini PC 1, Intel Core i5-14400 | 100 h | 16 threads | 5 600 |
| Mini PC 2, Intel Core i5-14400 | 15 h | 16 threads | 850 |
| Desktop PC, NVIDIA RTX 4060 | 40 h | GPU | – |
| Rented NVIDIA RTX 4090 | 15 h | GPU | – |
In total about 27 300 GHz-hours on CPUs (GHz-hours = hours × threads × clock speed), or some 3.1 GHz-years, plus about 55 hours on GPUs. These figures are rough: clock speeds are typical values, and neither preparation nor a briefly rented server is included.
Chance of success
about 3 to 5 % per year
This is the estimated chance of finding a square within one year of uninterrupted searching on the desktop PC and the two mini PCs. It is a rough model estimate, not a measurement: no square has ever been seen from which to calibrate it. The different versions of the model give between 2 and 9 %.