Problems & Puzzles: Collection 20th

Coll.20th-012. Magic Square 20x20

On April 10, 2018, Carlos Rivera wrote:

I would like to celebrate the 20th anniversary of my pages publishing a magic square 20x20 composed by 400 prime numbers and minimal magic sum.

Q1 Send your best solution.
Q2
Redo Q1 using 400 consecutive prime numbers


 

Carlos Rivera wrote on Set 13, 2018

I have already found a solution for Q2, in a web page by Tognon Stefano.

        Index= 21 Index= 420                        
N= 20 MS= 28184 Pr1= 73 Pr2= 2903 Distinct primes?= Yes Consecutive primes?= Yes      
2843 727 1997 359 2803 199 241 151 2621 997 1933 229 2087 349 1553 1493 1103 2161 1999 2339
2029 1871 1283 797 2777 1153 2417 239 853 1901 2237 571 857 2879 877 1993 743 1051 569 1087
2251 1621 673 1033 1759 2633 733 1663 1931 977 163 2239 2797 1013 2693 1231 353 313 1741 367
271 1277 283 1031 1831 1987 373 337 2203 2591 2903 2441 659 709 2111 2011 2713 1697 617 139
2719 2503 1657 1439 251 2017 449 101 2297 587 883 1531 821 2531 509 1229 541 1373 2083 2663
2381 2707 563 1297 599 2659 2459 1489 463 1181 2053 2069 863 1867 2213 547 431 347 173 1823
269 1249 131 2731 1021 2689 911 2447 1213 1583 1201 2099 829 311 1667 149 2819 2333 1579 953
757 907 1783 2141 967 937 2749 1559 1747 401 1381 523 1217 2473 2767 193 683 1597 691 2711
1889 2063 1163 1423 1801 281 613 2113 2039 1039 983 1097 1879 1499 1237 761 2273 839 1721 1471
521 827 1321 1171 2143 227 2179 1259 1601 2269 379 1123 331 1973 1709 487 2137 2609 2311 1607
491 2399 947 2003 2647 1091 2357 157 181 1279 1913 2309 2549 467 2131 2687 263 107 419 1787
2423 619 1873 1367 719 1289 1877 109 1429 2887 257 607 2221 1609 2347 751 1019 2371 1109 1301
991 103 457 1733 1483 499 2897 1811 2857 557 2351 389 643 1187 1409 1451 1571 631 2753 2411
1789 1753 1619 773 167 2833 1303 2089 1049 1487 1063 383 653 2281 919 2383 2393 2617 439 191
593 2521 2861 1627 73 1447 929 2699 1543 701 1319 1093 211 233 859 2729 2801 1637 2129 179
2027 197 2741 1427 2081 601 293 2791 307 2543 97 1549 2293 1949 277 1567 577 2593 661 1613
1693 89 1979 971 1069 1291 2267 1951 443 79 887 2837 1151 1777 2207 2789 647 641 739 2677
461 677 2153 941 1861 2557 2579 1433 809 2287 2539 317 2683 1061 83 127 1847 787 1523 1459
1307 2851 223 2467 409 433 421 1129 1117 1327 2243 2437 2671 1193 113 1907 881 1669 2377 1009
479 1223 2477 1453 1723 1361 137 2657 1481 1511 1399 2341 769 823 503 1699 2389 811 2551 397

The only clue we have about the date of this results is the copyright of the site: "(C) 1996-2000 Tognon Stefano".

In these pages we my find solutions for magic squares composed by consecutive primes fro N=4 to 63. More interesting that the results is that in other pages of this site we may find a description of the strategy & algorithms used by Tognon, including come codes available for free to produce these kind of magic squares.

...

Inder Taneja made me notice another interesting site, this one by Bogdan Golunski. These pages are full of very interesting results and methods, related to magic squares composed only by prime numbers. Nevertheless I did not find any 20x20 prime solution. As a matter of fact all the solutions shown are for odd values for the matrix order for magic bordered prime squares, using not necessarily consecutive primes.

***

On my personal request Tognon Stefano constructed and solved the question Q1 of this puzzle: A 20x20 magic square using 400 distinct primes and with the minimal magic sum (25666). The primes used goes from the 2nd prime (3) to the 402th prime (2753), not using the 3rd prime (5). He did this on Sept 17, 2018. Stefano used one of the codes he developed years ago, and got this magic primes square in 0.023 seconds.

Additionally, Stefano shares with us here an old pdf document that describes the algorithm used by his code.

I offer the same document hosted in my site, just to be sure against sites shutdowns.

Here is the solution to Q1:  

N=20 solution find in 0.023 s     Index= 2 Index= 402                          

ST=

513320

MS=

25666 Pr min 3 Pr max 2753 Distinct primes?  Yes     Csc primes?  Yes   Absent prime?  5       25666
241 461 977 2267 1153 1499 7 2707 2053 1777 59 2383 1063 2381 389 1453 1481 911 2237 167 25666
571 157 1693 2069 1721 509 311 2467 929 647 2549 1439 751 2371 1987 2411 383 1483 557 661 25666
1433 2693 73 173 233 1229 2221 307 1103 1753 2039 1361 2111 1237 1571 1741 967 953 1549 919 25666
2351 797 631 2749 2671 1201 547 857 2089 89 2339 2029 937 2281 1291 523 37 29 1187 1031 25666
521 619 1783 1009 2099 107 2081 1999 907 1327 97 2083 31 677 2287 2459 1039 227 1877 2437 25666
1597 1907 653 271 1607 1451 421 191 41 2207 2719 313 131 2579 1609 347 1579 2333 1459 2251 25666
211 719 1429 1373 2239 599 2663 2377 2311 101 193 2441 419 673 2521 2153 487 1559 149 1049 25666
197 1931 2129 1129 1493 1021 503 1087 2447 1723 607 1861 617 577 353 1019 2503 2141 727 1601 25666
787 449 769 47 1543 1423 1823 2213 443 1447 1531 739 2729 281 283 1993 491 2309 1733 2633 25666
1873 1151 1697 229 13 2593 401 277 179 1847 317 1279 2617 1097 479 2531 2551 839 1949 1747 25666
331 601 2753 2113 23 821 1669 83 941 1811 2683 1297 2357 1069 563 2711 743 2677 11 409 25666
1213 1913 2543 67 1709 1889 883 269 439 1871 1033 251 2179 541 1667 1163 2477 263 1093 2203 25666
2269 1973 53 1109 239 2341 2699 613 2591 2003 2423 223 691 991 1321 163 1307 1301 1217 139 25666
859 1489 569 2393 887 1303 2557 809 1409 1627 593 61 1061 1259 1283 17 2011 2473 359 2647 25666
2657 1933 877 2389 2659 2161 431 761 113 43 1619 2621 2731 811 373 151 1013 257 499 1567 25666
1123 1699 823 683 2137 1471 1231 1381 2087 79 659 1759 103 2713 2741 1657 433 1051 983 853 25666
1487 127 2417 1523 997 71 2027 1901 2539 1171 1613 709 701 1979 863 109 2689 467 2273 3 25666
1427 457 1367 1117 1277 1663 1951 2399 19 2143 1399 2131 2297 199 773 881 643 463 1181 1879 25666
1831 2243 641 1319 137 1223 293 1997 733 1621 367 349 587 1193 1801 1787 1583 2063 2609 1289 25666
2687 2347 1789 1637 829 1091 947 971 2293 379 827 337 1553 757 1511 397 1249 1867 2017 181 25666
25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666 25666

***


Records   |  Conjectures  |  Problems  |  Puzzles