Home › Forum › Magic Cubes of Prime Numbers › Algorithms and ideas
- Questo topic ha 42 risposte, 1 partecipante ed è stato aggiornato l'ultima volta 9 anni, 10 mesi fa da Natalia Makarova.
-
AutorePost
-
Aprile 25, 2014 alle 9:11 am #103Natalia MakarovaPartecipante
Hello, everyone!
I invite you to a discussion about the competition problem “Magic Cubes of prime numbers.”
You can ask questions, express your ideas and propose algorithms.
I make message my ideas also dxdy.ru forum in Russia
http://dxdy.ru/topic27852.htmlNatalia
Aprile 26, 2014 alle 5:57 am #104Natalia MakarovaPartecipanteHello!
I offer patterns for magic cubes of order 4.
Pattern #1 of residues modulo 3:
1 1 2 2
1 1 2 2
2 2 1 1
2 2 1 11 1 2 2
2 1 2 1
1 2 1 2
2 2 1 12 2 1 1
1 2 1 2
2 1 2 1
1 1 2 22 2 1 1
2 2 1 1
1 1 2 2
1 1 2 2Pattern #2 of residues modulo 5:
2 4 3 1
1 2 1 1
1 2 3 4
1 2 3 43 4 4 4
4 2 2 2
4 3 1 2
4 1 3 23 3 1 3
4 3 4 4
2 3 4 1
1 1 1 22 4 2 2
1 3 3 3
3 2 2 3
4 1 3 2Drafting magic cube of order 4 pattern provides a solution quickly.
Aprile 26, 2014 alle 5:54 pm #105Natalia MakarovaPartecipanteYou can have a home program checking solutions.
Ed Mertensotto made this program
https://www.dropbox.com/s/fz5d1jb6upyk3br/MagicCube.exeAprile 27, 2014 alle 7:59 pm #106Natalia MakarovaPartecipanteAt this moment known the following solutions:
Task #1
n = 4, S = 810 (my solution, not minimal?)
n = 5 – unknown
n = 6, S = 29610
http://www.magic-squares.net/c-t-htm/c_prime.htm
n = 7, unknownTask #2
n = 4, S = 1260 (my solution; minimal)
n = 5 – unknown
n = 6 – unknown
n = 7 – unknownMaggio 2, 2014 alle 11:25 am #108Natalia MakarovaPartecipanteOn this page
http://www.magic-squares.net/c-t-htm/c_prime.htmwe see concentric prime cube of order 6
Magic constant of the cube S = 29610.
I propose to make such a magic cube with less magical constant.
Maggio 7, 2014 alle 11:57 am #114Natalia MakarovaPartecipanteMake associative cube of order 4 with constant associativity 6600.
Insert this cube in model right. You get a magic cube of order 6.Maggio 10, 2014 alle 3:46 am #116Natalia MakarovaPartecipanteI propose a model of concentric magic cube of order 7
Here k = 21806.
I found the inner cube of order 5, S = 54515 (I know the variables yi).
Now I want to find a magic cube of order 7 on this model.
Try this all!Maggio 12, 2014 alle 5:57 am #117Natalia MakarovaPartecipanteI found a solution to the above-proposed model.
Now the magic cube of order 7 of distinct prime numbers known!
Magic constant S = 76321.
This concentric magic cube!This pattern of residues modulo 4 corresponds to the solution found:
3 1 1 1 3 3 1 3 1 3 3 3 3 1 3 1 3 3 3 3 1 3 3 1 3 1 3 3 3 1 3 1 1 3 1 1 3 1 1 3 3 1 1 3 1 1 3 3 1 3 3 3 1 1 1 1 3 3 3 1 3 1 3 1 1 3 3 3 1 1 3 3 3 3 1 1 3 3 3 1 3 1 3 3 3 1 1 1 3 1 3 1 3 3 1 1 1 3 3 3 1 3 3 1 3 1 3 3 3 3 3 1 3 3 1 1 3 3 3 3 3 3 1 1 3 3 1 3 1 3 1 3 1 3 3 3 3 3 3 3 3 3 1 3 3 1 3 3 3 3 3 1 3 1 1 3 3 3 1 1 1 1 1 3 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 3 1 1 1 1 3 3 1 3 1 1 3 3 3 1 3 3 1 1 3 1 3 3 1 1 1 1 3 1 1 1 3 1 1 3 1 1 3 3 3 1 1 3 3 3 1 1 3 1 1 1 1 3 1 1 3 1 1 3 1 1 3 1 3 3 1 3 3 1 3 3 3 1 3 1 1 1 3 1 3 1 1 3 3 3 1 1 1 1 3 3 1 3 1 3 3 1 3 1 3 3 1 1 3 1 3 3 1 1 3 1 3 3 3 3 1 3 1 1 3 3 1 1 1 3 3 3 3 3 1 1 3 3 3 3 3 3 3 1 3 1 3 3 1 1 3 1 1 3 3 1 3 1 1 3 3 1 1 1 1 1 3 3 3
Maggio 18, 2014 alle 2:09 am #119Natalia MakarovaPartecipanteI found an approximate solution of task # 2, n = 7:
1783 19429 2593 3373 14983 19423 14737 1399 13417 17203 17047 6883 19 20353 13267 14629 15727 859 4567 13339 13933 20347 3943 19249 1483 19777 4903 6619 787 11353 17383 17293 1033 10303 18169 20809 4507 1693 17713 11119 19267 1213 17929 9043 2473 18553 17959 9067 1297 21649 6367 19717 17167 373 2719 8329 19417 12109 9187 3967 16363 4339 10939 9769 3499 18223 10657 16573 14083 3517 1699 6547 193 20359 21523 7243 18757 9967 6073 8623 13873 12703 12919 12163 8707 20743 9049 4549 1327 15199 16747 5113 20983 11329 5749 7459 19819 5869 2053 15277 15643 8839 21193 11437 1879 1993 12799 7039 9463 6151 21799 17077 13879 21739 2833 13681 1099 4597 18493 9883 15073 12697 17359 79 15607 5623 21499 4099 877 4357 21493 18919 5077 21577 1087 16069 10249 10567 1759 15013 5437 6247 21163 12373 15739 2203 13159 5743 919 14107 18199 9319 13597 14437 21067 8803 487 12937 8317 11083 13627 9397 13177 9349 21229 15547 409 7213 9973 13093 20143 10903 1663 8713 11833 14593 21397 6259 577 12457 8629 12409 8179 10723 13489 8869 21319 13003 739 7369 8209 12487 3607 7699 20887 16063 8647 19603 6067 9433 643 15559 16369 6793 20047 11239 11557 5737 20719 229 16729 2887 313 17449 20929 17707 307 16183 6199 21727 4447 9109 6733 11923 3313 17209 20707 8125 18973 67 7927 4729 7 15655 12343 14767 9007 19813 19927 10369 613 12967 6163 6529 19753 15937 1987 14347 16057 10477 823 16693 5059 6607 20479 17257 12757 1063 13099 9643 8887 9103 7933 13183 15733 11839 3049 14563 283 1447 21613 15259 20107 18289 7723 5233 11149 3583 18307 12037 10867 17467 5443 17839 12619 9697 2389 13477 19087 21433 4639 2089 15439 157 20509 12739 3847 3253 19333 12763 3877 20593 2539 10687 4093 20113 17299 997 3637 11503 20773 4513 4423 10453 21019 15187 16903 2029 20323 2557 17863 1459 7873 8467 17239 20947 6079 7177 8539 1453 21787 14923 4759 4603 8389 20407 7069 2383 6823 18433 19213 2377 20023
Checking in the program Ed Mertensotto showed:
type 2 size 7 1099 is not prime 10249 is not prime 12937 is not prime 21229 is not prime 15547 is not prime 6259 is not prime 13489 is not prime 8869 is not prime 11557 is not prime 8125 is not prime 15655 is not prime All Sums = 76321 All Associative Sums = 21806
We have in this solution 11 bad items.
This solution corresponds to the pattern of residues modulo 4:3 1 1 1 3 3 1 3 1 3 3 3 3 1 3 1 3 3 3 3 1 3 3 1 3 1 3 3 3 1 3 1 1 3 1 1 3 1 1 3 3 1 1 3 1 1 3 3 1 1 3 1 3 1 3 1 1 1 3 3 3 3 3 1 3 3 1 1 3 1 3 3 1 3 3 3 1 3 1 3 1 3 3 3 3 3 1 1 3 3 3 1 3 1 1 3 3 1 1 1 3 3 1 1 3 1 3 3 3 3 3 1 3 3 1 1 3 1 1 3 1 1 3 3 3 3 3 3 1 1 1 3 1 1 3 1 1 3 3 1 1 3 3 1 3 3 3 3 3 3 3 3 1 1 3 3 3 1 1 3 3 1 1 1 1 3 1 1 1 1 3 3 3 1 1 1 1 3 1 1 1 1 3 3 1 1 3 3 3 1 1 3 3 3 3 3 3 3 3 1 3 3 1 1 3 3 1 1 3 1 1 3 1 1 1 3 3 3 3 3 3 1 1 3 1 1 3 1 1 3 3 1 3 3 3 3 3 1 3 1 1 3 3 1 1 1 3 3 1 1 3 1 3 3 3 1 1 3 3 3 3 3 1 3 1 3 1 3 3 3 1 3 3 1 3 1 1 3 3 1 3 3 3 3 3 1 1 1 3 1 3 1 3 1 1 3 3 1 1 3 1 1 3 3 1 1 3 1 1 3 1 1 3 1 3 3 3 1 3 1 3 3 1 3 3 3 3 1 3 1 3 3 3 3 1 3 1 3 3 1 1 1 3
I now try to find a solution to this pattern.
Try it all!
- Questa risposta è stata modificata 9 anni, 11 mesi fa da Natalia Makarova.
Maggio 18, 2014 alle 2:32 am #121Natalia MakarovaPartecipanteFor associative cube of order 7 with a magic constant S = 76321 must use the following array of prime numbers:
3 7 19 67 79 157 193 229 277 283 307 313 373 409 487 523 613 619 643 739 787 823 859 877 907 919 997 1033 1063 1087 1213 1297 1327 1399 1447 1453 1459 1483 1657 1663 1693 1699 1759 1777 1783 1879 1987 1993 2029 2053 2089 2203 2377 2383 2389 2473 2539 2557 2593 2719 2797 2833 2887 3019 3049 3169 3253 3313 3373 3499 3517 3583 3607 3637 3673 3709 3793 3847 3877 3943 3967 4057 4093 4099 4297 4339 4357 4363 4423 4447 4507 4513 4549 4567 4597 4603 4639 4729 4759 4813 4903 5059 5077 5107 5113 5233 5437 5443 5557 5623 5737 5743 5749 5869 6067 6073 6079 6163 6199 6247 6367 6379 6529 6547 6607 6619 6733 6793 6823 6883 7027 7039 7069 7177 7213 7243 7369 7417 7459 7699 7723 7873 7927 7933 8017 8179 8209 8269 8293 8329 8389 8467 8539 8623 8629 8647 8707 8713 8803 8839 8887 9007 9043 9049 9067 9103 9109 9187 9319 9349 9397 9433 9463 9643 9649 9697 9733 9769 9883 9967 9973 10303 10369 10453 10477 10567 10657 10687 10723 10867 10939 11083 11119 11149 11239 11329 11353 11437 11503 11833 11839 11923 12037 12073 12109 12157 12163 12343 12373 12409 12457 12487 12619 12697 12703 12739 12757 12763 12799 12919 12967 13003 13093 13099 13159 13177 13183 13267 13339 13417 13477 13513 13537 13597 13627 13789 13873 13879 13933 14083 14107 14347 14389 14437 14563 14593 14629 14737 14767 14779 14923 14983 15013 15073 15187 15199 15259 15277 15427 15439 15559 15607 15643 15727 15733 15739 15937 16057 16063 16069 16183 16249 16363 16369 16573 16693 16699 16729 16747 16903 16993 17047 17077 17167 17203 17209 17239 17257 17293 17299 17359 17383 17443 17449 17467 17509 17707 17713 17749 17839 17863 17929 17959 18013 18097 18133 18169 18199 18223 18289 18307 18433 18493 18553 18637 18757 18787 18919 18973 19009 19087 19213 19249 19267 19333 19417 19423 19429 19603 19717 19753 19777 19813 19819 19927 20023 20029 20047 20107 20113 20143 20149 20323 20347 20353 20359 20407 20479 20509 20593 20719 20743 20773 20809 20887 20899 20929 20947 20983 21019 21067 21163 21187 21193 21283 21319 21397 21433 21493 21499 21523 21529 21577 21613 21649 21727 21739 21787 21799 21803
- Questa risposta è stata modificata 9 anni, 11 mesi fa da Natalia Makarova.
Maggio 23, 2014 alle 7:01 am #126Natalia MakarovaPartecipanteTask 2 for n = 7 is very difficult for me.
I can easily make such semi-magic-cubesNext my program can fill the cells, that contain the number 0, only different natural numbers.
I carried out all the experiments only for the constant associativity K = 21806.Does anybody have the best algorithm for this problem?
- Questa risposta è stata modificata 9 anni, 11 mesi fa da Natalia Makarova.
Maggio 27, 2014 alle 11:43 am #128Natalia MakarovaPartecipanteConcentric magic cube of order 6 (model):
I can not find a cube of order 4 with a magical constant S = 4020, so that all elements were unique (including edging cube of order 6).
- Questa risposta è stata modificata 9 anni, 11 mesi fa da Natalia Makarova.
- Questa risposta è stata modificata 9 anni, 11 mesi fa da Natalia Makarova.
Maggio 29, 2014 alle 8:06 am #131Natalia MakarovaPartecipanteI managed to implement the proposed above model, but the solution have not unique numbers:
13,59,1319,1439,1987,1213, 1811,479,397,257,1759,1327, 1973,383,839,1277,1091,467, 1103,1949,1283,461,353,881, 991,1259,499,1409,439,1433, 139,1901,1693,1187,401,709, 7,389,1777,1487,1913,457, 1063,1831,19,1061,1109,947, 977,883,1663,23,1451,1033, 1249,1193,41,2707,79,761, 1181,113,2297,229,1381,829, 1553,1621,233,523,97,2003, 809,1601,1291,557,31,1741, 1567,181,43,2063,1733,443, 1151,1277,1249,1061,433,859, 1447,1069,1667,463,821,563, 787,1493,1061,433,1033,1223, 269,409,719,1453,1979,1201, 1993,1999,1013,487,311,227, 263,449,1721,883,967,1747, 163,277,617,2029,1097,1847, 971,1427,1303,197,1093,1039, 857,1867,379,911,863,1153, 1783,11,997,1523,1699,17, 1907,1873,313,1237,179,521, 643,1559,2237,13,211,1367, 223,1583,491,907,1039,1787, 131,331,1009,653,2027,1879, 1637,547,283,2447,743,373, 1489,137,1697,773,1831,103, 1301,109,317,823,1609,1871, 683,1531,1613,1753,251,199, 1543,1627,1171,733,919,37, 1129,61,727,1549,1657,907, 577,751,1511,601,1571,1019, 797,1951,691,571,23,1997
Checking in the program by Ed Mertensotto shows:
type 1
size 6
1277 is not unique
1249 is not unique
1061 is not unique
1061 is not unique
433 is not unique
1033 is not unique
883 is not unique
13 is not unique
1039 is not unique
1831 is not unique
907 is not unique
23 is not unique
All Sums = 6030I think there is a better solution for this model.
- Questa risposta è stata modificata 9 anni, 11 mesi fa da Natalia Makarova.
Giugno 1, 2014 alle 3:12 am #134Natalia MakarovaPartecipanteThis solution is better, there is only one bad element – 841 is not a prime number:
13,59,1319,1439,1987,1213, 1811,479,397,257,1759,1327, 1973,383,839,1277,1091,467, 1103,1949,1283,461,353,881, 991,1259,499,1409,439,1433, 139,1901,1693,1187,401,709, 7,389,1777,1487,1913,457, 1063,1861,19,641,1499,947, 977,661,2017,599,743,1033, 1249,821,107,1663,1429,761, 1181,677,1877,1117,349,829, 1553,1621,233,523,97,2003, 809,1601,1291,557,31,1741, 1567,151,73,1667,2129,443, 1151,941,769,1031,1279,859, 1447,619,2069,1051,281,563, 787,2309,1109,271,331,1223, 269,409,719,1453,1979,1201, 1993,1999,1013,487,311,227, 263,449,1889,1471,211,1747, 163,937,1061,1093,929,1847, 971,2213,877,887,43,1039, 857,421,193,569,2837,1153, 1783,11,997,1523,1699,17, 1907,1873,313,1237,179,521, 643,1559,2039,241,181,1367, 223,1481,173,1297,1069,1787, 131,367,967,419,2267,1879, 1637,613,841*,2063,503,373, 1489,137,1697,773,1831,103, 1301,109,317,823,1609,1871, 683,1531,1613,1753,251,199, 1543,1627,1171,733,919,37, 1129,61,727,1549,1657,907, 577,751,1511,601,1571,1019, 797,1951,691,571,23,1997
I hope to find a good solution.
Giugno 4, 2014 alle 12:25 am #136Natalia MakarovaPartecipanteI found a semi-magic cube of order 4 with magic constant S = 750:
313,103,53,281, 7,13,311,419, 29,383,307,31, 401,251,79,19, 37,211,233,269, 71,373,23,283, 463,107,163,17, 179,59,331,181, 11,263,337,139, 541,137,67,5, 101,151,89,409, 97,199,257,197, 389,173,127,61, 131,227,349,43, 157,109,191,293, 73,241,83,353
Checking in the program by Ed Mertensotto showed:
type 1 size 4 rows ... columns ... pillars ... diagonals 1128 = 313(1,1,1) + 373(2,2,2) + 89(3,3,3) + 353(4,4,4) 528 = 281(4,1,1) + 23(3,2,2) + 151(2,3,3) + 73(1,4,4) 636 = 401(1,4,1) + 107(2,3,2) + 67(3,2,3) + 61(4,1,4) 708 = 19(4,4,1) + 163(3,3,2) + 137(2,2,3) + 389(1,1,4) Sums Found 750 1128 528 636 708
Sums of the numbers on the main diagonal of a cube wrong.
If we have a semi-magic square can easily convert it into a magic square.
For example:this semi-magic square of order 7 with magic constant S = 733:
37,41,163,97,179,173,43, 3,5,7,23,223,233,239, 211,191,181,19,31,29,71, 79,83,89,107,109,127,139, 199,197,103,193,17,11,13, 53,149,59,157,101,47,167, 151,67,131,137,73,113,61
We rearrange the rows in this square and get the magic square:
3,5,7,23,223,233,239, 211,191,181,19,31,29,71, 79,83,89,107,109,127,139, 199,197,103,193,17,11,13, 53,149,59,157,101,47,167, 151,67,131,137,73,113,61, 37,41,163,97,179,173,43
See this article:
http://www.natalimak1.narod.ru/sqmin1.htmQuestion:
whether it is possible in this way to convert semi-magic cube in magic?- Questa risposta è stata modificata 9 anni, 11 mesi fa da Natalia Makarova.
- Questa risposta è stata modificata 9 anni, 11 mesi fa da Natalia Makarova.
-
AutorePost
- Devi essere connesso per rispondere a questo topic.