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 |
***
Carlos Rivera wrote on
Set. 24, 2018:
I divided the set of 400 consecutive primes from 73 to
2903 (used in the solution to Q2) in 4 sets of 100 primes, each set with
the same total sum of primes in order to ask Stefano Tognon to find
their respective magic square. He did it in just a few seconds and sent
them back to me. Of course each of the four 10x10 magic squares can be
oriented in 8 ways inside a 20x20 matrix. Moreover, the four 10x10 magic squares can be
located relatively to each other in 4! ways.
This kind of magic square was asked to me by Fausto Morales
some weeks ago in a private email-
Four magic squares 10x10, MS=14092 each, using 400 distinct
csc distinct primes and forming one magic squares 20x20,
MS=28184 |
|
|
By Stefano Tognon and Carlos Rivera. Sept 24, 2018 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
28184 |
241 |
1109 |
113 |
1697 |
2311 |
1801 |
337 |
1583 |
2897 |
2003 |
1019 |
2767 |
2617 |
461 |
1009 |
223 |
1861 |
307 |
2017 |
1811 |
28184 |
2309 |
1423 |
373 |
1789 |
647 |
811 |
1613 |
2267 |
1559 |
1301 |
1571 |
313 |
643 |
1723 |
2621 |
2857 |
631 |
1249 |
191 |
2293 |
28184 |
2777 |
1787 |
1193 |
2659 |
673 |
1279 |
137 |
353 |
2671 |
563 |
1489 |
227 |
1913 |
1429 |
2437 |
131 |
947 |
1877 |
1511 |
2131 |
28184 |
509 |
997 |
2803 |
1237 |
101 |
2099 |
2837 |
2053 |
149 |
1307 |
2593 |
1367 |
229 |
1579 |
1181 |
2029 |
499 |
1277 |
691 |
2647 |
28184 |
2521 |
2213 |
829 |
1747 |
1039 |
1231 |
109 |
2843 |
269 |
1291 |
1427 |
2819 |
1889 |
683 |
449 |
1447 |
2467 |
1051 |
1117 |
743 |
28184 |
167 |
1229 |
2243 |
523 |
1693 |
2797 |
89 |
1523 |
1087 |
2741 |
661 |
1901 |
2377 |
577 |
2153 |
2203 |
1621 |
859 |
757 |
983 |
28184 |
1543 |
1163 |
1973 |
601 |
1597 |
311 |
2833 |
1471 |
1069 |
1531 |
1409 |
2399 |
2383 |
1831 |
317 |
211 |
263 |
1709 |
2749 |
821 |
28184 |
1483 |
1753 |
977 |
1021 |
2683 |
197 |
1979 |
139 |
2539 |
1321 |
827 |
619 |
853 |
2791 |
479 |
2333 |
733 |
2729 |
1871 |
857 |
28184 |
83 |
379 |
2879 |
239 |
2287 |
2503 |
2861 |
1451 |
1283 |
127 |
439 |
773 |
349 |
1619 |
2143 |
1171 |
2371 |
2543 |
2251 |
433 |
28184 |
2459 |
2039 |
709 |
2579 |
1061 |
1063 |
1297 |
409 |
569 |
1907 |
2657 |
907 |
839 |
1399 |
1303 |
1487 |
2699 |
491 |
937 |
1373 |
28184 |
293 |
1033 |
2417 |
2239 |
1319 |
1031 |
421 |
2663 |
727 |
1949 |
677 |
2161 |
1741 |
2113 |
2089 |
2447 |
397 |
281 |
199 |
1987 |
28184 |
2609 |
157 |
1999 |
617 |
1733 |
887 |
1607 |
1553 |
2473 |
457 |
1699 |
911 |
2677 |
181 |
487 |
2083 |
1783 |
1847 |
1433 |
991 |
28184 |
1601 |
163 |
1627 |
2221 |
2129 |
2357 |
571 |
233 |
1049 |
2141 |
2557 |
1549 |
641 |
1873 |
1481 |
751 |
1669 |
367 |
2081 |
1123 |
28184 |
1459 |
2713 |
103 |
251 |
347 |
1567 |
2719 |
2011 |
1721 |
1201 |
2441 |
1439 |
1667 |
1933 |
587 |
419 |
2707 |
919 |
653 |
1327 |
28184 |
257 |
179 |
2341 |
2549 |
2393 |
1663 |
547 |
607 |
2339 |
1217 |
2381 |
971 |
613 |
1103 |
2887 |
359 |
2633 |
1609 |
797 |
739 |
28184 |
2789 |
2477 |
1453 |
107 |
1361 |
467 |
2753 |
1013 |
383 |
1289 |
2179 |
2351 |
151 |
877 |
2273 |
1093 |
271 |
2347 |
557 |
1993 |
28184 |
1151 |
1091 |
967 |
823 |
599 |
2591 |
2851 |
2687 |
73 |
1259 |
431 |
1213 |
2551 |
1997 |
521 |
2269 |
1223 |
277 |
2801 |
809 |
28184 |
2411 |
2069 |
443 |
769 |
2063 |
2731 |
1129 |
761 |
1637 |
79 |
173 |
193 |
719 |
1657 |
881 |
2237 |
1867 |
2137 |
2297 |
1931 |
28184 |
593 |
1499 |
1879 |
1823 |
1759 |
701 |
541 |
283 |
2903 |
2111 |
401 |
1097 |
1951 |
2027 |
463 |
941 |
659 |
1777 |
2087 |
2689 |
28184 |
929 |
2711 |
863 |
2693 |
389 |
97 |
953 |
2281 |
787 |
2389 |
1153 |
2207 |
1381 |
331 |
2423 |
1493 |
883 |
2531 |
1187 |
503 |
28184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28184 |
|