Prime Number Magic Cubes

Magic cubes constructed using all prime numbers are relatively rare (this written March 2003). The four I found all appeared in three articles in the Journal of Recreational Mathematics.

Prime number magic cubes may come in a variety of types, just as prime magic squares do. However, they can never be classed as normal because they cannot be constructed using consecutive numbers.

 Two Suzuki Prime Order-3 Cubes Gakuho Abe Order-4 Prime Cube Johnson Prime Pantriagonal Magic Cube An order-6 Prime Number Magic Cube Order-8 Concentric Prime Magic Cube Challenges !

Two Suzuki Prime Order-3 Cubes

 ```Plane 1_Top Plane 2 Plane 3_Bottom 263 2309 2087 1439 1487 1733 2957 863 839 2129 107 2423 1847 1553 1259 683 2999 977 2267 2243 149 1373 1619 1667 1019 797 2843``` This order-3 prime number magic cube was constructed by Akio Suzuki in 1977. [1] Like all order 3 magic cubes, it is associated, but not pantriagonal. And like odd order associated magic cubes, the 3 central orthogonal planes are associated magic squares. Prime numbers used range from 107 to 2999. Each complement pair sums 3106. The constant is 4659 (sorry, not a prime). Also, like other associated magic cubes, this one is semi-pantriagonal.

 ```Plane 1_Top Plane 2 Plane 3_Bottom 2153 929 227 509 1607 1193 647 773 1889 839 947 1523 1787 1103 419 683 1259 1367 317 1433 1559 1013 599 1697 1979 1277 53``` Also constructed by Akio Suzuki in 1977 [1]. This cube has exactly the same characteristics as the above cube except it uses a smaller prime numbers. Prime numbers used range from 53 to 2153. Each complement pair sums 2206 which is the sum of the smallest and largest number used. In both cases, the middle number of the cube is this sum divided by 2. Both of these characteristics are common to all associated magic hypercubes. The constant is 3309. Addendum: As a result of a computer search, Allen Wm, Johnson, Jr. [2] confirmed in 2003 that this cube has the smallest possible sum for an order 3 prime magic cube using distinct digits.

Gakuho Abe Order-4 Prime Cube

Constructed by Gakuho Abe in 1977 [1], this magic cube is not associated.
It is simple magic with no extra features (except that it uses prime numbers). The magic constant, S = 4020. Prime numbers used range from 7 to 2003.

```Plane 4 – Top             Plane 3                   Plane 2                   Plane 1 - Bottom
7  1999    17  1997    1873    37  1979   131     233  1013   991  1783    1907   971  1033   109
1753   733  1283   251     311  1549   467  1693    1069   557  1447   947     887  1181   823  1129
257  1277   727  1759    1699   461  1543   317     941  1453   563  1063    1123   829  1187   881
2003    11  1993    13     137  1973    31  1879    1777   997  1019   227     103  1039   977  1901```

Note that none of the magic cubes shown on this page use consecutive prime numbers.

Johnson Prime Pantriagonal Magic Cube

This cube, constructed in 1985 [3], consists of 3 and 4 digit primes. Johnson calls this cube ‘pandiagonal’, a common name for a cube where all the oblique square pandiagonals are correct. We now call it pantriagonal because all the pan-3-agonals are correct. S = 19740.
(A pandiagonal magic cube is one where all orthogonal planes are pandiagonal magic squares.)

The difference in the sums of the two pairs of numbers in each pantriagonal that are spaced m/2 apart is 660. If the difference was 0, this cube would be called complete (the two sets of numbers would be complement pairs). That is a feature that is fairly common in order 4 pantriagonal magic cubes.

Prime numbers used range from 283 to 9587. This cube is associated because two numbers symmetrically located across the center point of the cube sum to the total of the first and last numbers in the series. I assume it is only possible for an order 4 pantriagonal magic cube to be associated if the cube is not normal (i.e. the numbers used are not consecutive).

In the same article, Johnson showed several other order-4 prime cubes that were not associated.

```Plane 1 – Top             Plane 2                   Plane 3                   Plane 4 - Bottom
5851  5743  6143  2003    8243  4877  6007   613    3209  5573  2281  8677    2437  3547  5309  8447
4547  8573   283  6337    6073  5521  2333  5813    3217  2767  8117  5639    5903  2879  9007  1951
7919   863  6991  3967    4231  1753  7103  6653    4057  7537  4349  3797    3533  9587  1297  5323
1423  4561  6323  7433    1193  7589  4297  6661    9257  3863  4993  1627    7867  3727  4127  4019  ```

An order-6 Prime Number Magic Cube

This order-6 cube and the order-8 following are both firsts to the best of my knowledge. hh (see The Cube TimeLine)
I received this cube in an email from Zhong Ming of Dazhou city in Sichuan province, China, and Peng Baowang of Qinghe county in Hebei, China on September 7, 2009. The cube was dated August 31, 2009.
Because all rows, columns and pillars as well as the 4 triagonals sum to the same constant, the cube is magic. It contains no magic squares (in fact, no diagonals sum correct), and no additional features, so is a Simple magic cube. It consists of 216 unique numbers (i.e. no duplicates), all of which are prime.

```Top Plane                              Top - 1                                Top - 2
4831  4783    67  9811  4639  5479      131   761   379  9403  9497  9439      337  8849  8821  1409  1307  8887
191   241   193  9473  9769  9743     8951  2437  3547  5309  8447   919     7013  5903  2879  9007  1951  2857
331   577  5009  4751  9619  9323     9643  3209  5573  2281  8677   227     8009  3217  2767  8117  5639  1861
8273  9719  8933  1123   829   733     2143  8243  4877  6007   613  7727     9049  6073  5521  2333  5813   821
8423  7499  8287  1789  1801  1811     8311  5851  5743  6143  2003  1559     4219  4547  8573   283  6337  5651
7561  6791  7121  2663  2953  2521      431  9109  9491   467   373  9739      983  1021  1049  8461  8563  9533
Bottom + 2                             Bottom + 1                             Bottom Plane
8543  8839  9277   173  1831   947     8419  3299  8317  1607  5419  2549     7349  3079  2749  7207  6917  2309
4177  3533  9587  1297  5323  5693     9151  7867  3727  4127  4019   719      127  9629  9677   397   101  9679
7487  4057  7537  4349  3797  2383     3593  9257  3863  4993  1627  6277      547  9293  4861  5119   251  9539
31  4231  1753  7103  6653  9839      977  1193  7589  4297  6661  8893     9137   151   937  8747  9041  1597
449  7919   863  6991  3967  9421      149  1423  4561  6323  7433  9721     8059  2371  1583  8081  8069  1447
8923  1031   593  9697  8039  1327     7321  6571  1553  8263  4451  1451     4391  5087  9803    59  5231  5039```

Order-8 Concentric Prime Magic Cube

On September 8, 2009, I received another email from Zhong Ming and Peng Baowang. Attached was an order-8 prime number magic cube containing an order-6 and an order-4 cube.
All cubes are magic because all orthogogonal lines and the 4 triagonals sum correctly to the constant.
No planar diagonals sum correctly so there are no magic squares in any of the 3 cubes. However, all broken triagonals sum correctly in the order-4 cube, so it is pantriagonal magic. (The other 2 are simple magic.). All numbers are unique primes.
The longest consecutive run of primes is right at the high end , with 9 adjacent primes.
The order-4 cube uses primes from 283 to 9587. S = 19740
The order-6 cube uses primes from 31 to 9839. S = 29610 The green numbers indicate the outside planes of this cube.
The order-4 cube uses primes from 11 to 9857. S = 39480
Because the high and low numbers are scattered throughout the 3 cubes, this cube is considered concentric rather then bordered.

```Top layer                                                  Top - 1
13   9859   6679   9829   2129     53   6869   4049       811   9127   7841   5867   7211   2909   3931   1783
1637   9781    103   8171    181   7577   9733   2297      6781   4831   4783     67   9811   4639   5479   3089
9511    349   3623    269    433   9787   7691   7817      4229    191    241    193   9473   9769   9743   5641
9631    257   7331   2477   9371   9413    521    479       409    331    577   5009   4751   9619   9323   9461
9283   1039    941    631   8837    661   8861   9227      7177   8273   9719   8933   1123    829    733   2693
6803    709   3613   8443   9187   3541   2617   4567      4967   8423   7499   8287   1789   1801   1811   4903
1493   8707   9043    907   8291   6701   1171   3167      7019   7561   6791   7121   2663   2953   2521   2851
1109   8779   8147   8753   1051   1747   2017   7877      8087    743   2029   4003   2659   6961   5939   9059
Top - 2                                                    top - 3
8431   1289   4951   4933   1063   8941   9013    859      8783   1181   8093   1759   1933   6379   2633   8719
5717    131    761    379   9403   9497   9439   4153      4201    337   8849   8821   1409   1307   8887   5669
6151   8951   2437   3547   5309   8447    919   3719      3671   7013   5903   2879   9007   1951   2857   6199
19   9643   3209   5573   2281   8677    227   9851      8641   8009   3217   2767   8117   5639   1861   1229
2711   2143   8243   4877   6007    613   7727   7159      7523   9049   6073   5521   2333   5813    821   2347
3307   8311   5851   5743   6143   2003   1559   6563      2719   4219   4547   8573    283   6337   5651   7151
4133    431   9109   9491    467    373   9739   5737      2791    983   1021   1049   8461   8563   9533   7079
9011   8581   4919   4937   8807    929    857   1439      1151   8689   1777   8111   7937   3491   7237   1087
Bottom + 3                                                 Bottom + 2
8669   1223   1483   7583   2267   7477   5197   5581      7529   7993   2111   3041   7789   3889   3947   3181
3779   8543   8839   9277    173   1831    947   6091      3449   8419   3299   8317   1607   5419   2549   6421
3917   4177   3533   9587   1297   5323   5693   5953      4021   9151   7867   3727   4127   4019    719   5849
5881   7487   4057   7537   4349   3797   2383   3989      1481   3593   9257   3863   4993   1627   6277   8389
2381     31   4231   1753   7103   6653   9839   7489      2113    977   1193   7589   4297   6661   8893   7757
3803    449   7919    863   6991   3967   9421   6067      7129    149   1423   4561   6323   7433   9721   2741
6761   8923   1031    593   9697   8039   1327   3109      7069   7321   6571   1553   8263   4451   1451   2801
4289   8647   8387   2287   7603   2393   4673   1201      6689   1877   7759   6829   2081   5981   5923   2341
Bottom + 1                                                 Bottom layer
3251   7717   6599   5351   8269   1709     37   6547      1993   1091   1723   1117   8819   8123   7853   8761
6343   7349   3079   2749   7207   6917   2309   3527      7573     89   9767   1699   9689   2293    137   8233
5927    127   9629   9677    397    101   9679   3943      2053   9521   6247   9601   9437     83   2179    359
4027    547   9293   4861   5119    251   9539   5843      9391   9613   2539   7393    499    457   9349    239
7649   9137    151    937   8747   9041   1597   2221       643   8831   8929   9239   1033   9209   1009    587
5449   8059   2371   1583   8081   8069   1447   4421      5303   9161   6257   1427    683   6329   7253   3067
3511   4391   5087   9803     59   5231   5039   6359      6703   1163    827   8963   1579   3169   8699   8377
3323   2153   3271   4519   1601   8161   9833   6619      5821     11   3191     41   7741   9817   3001   9857```

What is the smallest possible prime number magic cube? (Answered for order 3 with the 2nd Suzuki cube above).

What is the smallest possible consecutive prime numbers magic cube?
If such a cube is possible, it would use astronomically large numbers. Nelson [4] constructed the first order-3 magic square using 9 consecutive prime numbers starting with 1,480,028,129. An order-3 prime cube would require a string of 27 suitable consecutive prime numbers!

[1] Gakuho Abe, Related Magic Squares with Prime Elements, JRM 10:2 1977-78, pp.96-97.
[2] A. W. Johnson, Jr., Solution to Problem 2617, JRM 32:4, 2003-2004, pp. 338-339
[3] A. W. Johnson, Jr., An Order 4 Prime Magic Cube, JRM 18:1, 1985-86, pp 5-7
[4] H. L. Nelson, A Consecutive Prime 3 x 3 Magic Square, JRM, 1988, vol. 20:3, pp 214-216. See my Prime Squares page.

 This page was originally posted March 2003 It was last updated October 19, 2010 Harvey Heinz   harveyheinz@shaw.ca Copyright © 1998-2009 by Harvey D. Heinz