4x4 Magic Square of Cubes
Formulation
4x4 magic squares of cubes of distinct integers exist if negative integers are allowed, but a 4x4 magic square of positive distinct cubes is an open problem. You can use this procedure to efficiently search for 4x4 magic squares of cubes, 4th powers, primes, prime powers, etc. The first section shows the formulation and proves the equivalence. The second section is a suggested computer procedure that takes advantage of the symmetries so that NlogN sorting can be used to replace less efficient searching. All variables below are assumed to be cubes. 4x4 Magic Equivalence Theorem Find 10 numbers, each expressible as the sum of two cubes in two ways that also have the following inter-relationships. B+C = Q+M E+I = Q+D B+N = K+G E+H = K+J P+C = F+J L+I = F+G P+N = A+D L+H = A+M Q+A = G+J M+D = K+F The values can then be arranged to form a 4x4 magic square of cubes. A B C D E F G H I J K L M N P Q Also, all 4x4 magic squares of cubes are representable as a solution to the above 10 expressions. Proof of Necessity A+B+C+D = A+F+K+Q & B+F+J+N = M+N+P+Q & C+G+K+P = D+G+J+M ==> B+C = Q+M and by symmetry E+I = Q+D P+N = A+D L+H = A+M E+F+G+H = I+J+K+L & A+E+I+M = A+F+K+Q & D+H+L+Q = D+G+J+M ==> E+H = K+J and by symmetry B+N = K+G L+I = F+G P+C = F+J A+B+C+D = B+F+J+N & M+N+P+Q = C+G+K+P & A+F+K+Q = D+G+J+M ==> Q+A = G+J and by symmetry M+D = K+F Proof of Sufficiency G+J = Q+A & M+D = F+K ==> D+G+J+M = A+F+K+Q F+K = M+D & Q+M = B+C ==> F+K+Q = B+C+D ==> A+F+K+Q = A+B+C+D A+D = N+P & B+C = Q+M ==> A+B+C+D = M+N+P+Q N+P = A+D & A+M = H+L ==> M+N+P = D+H+L ==> M+N+P+Q = D+H+L+Q H+L = A+M & Q+D = E+I ==> D+H+L+Q = A+E+I+M A+M = H+L & H+E = J+K ==> A+E+M = J+K+L ==> A+E+I+M = I+J+K+L G+K = B+N & L+I = G+F ==> I+K+L = B+F+N ==> I+J+K+L = B+F+J+N J+F = C+P & B+N = G+K ==> B+F+J+N = C+G+K+P J+K = H+E & C+P = J+F ==> C+K+P = E+F+H ==> C+G+K+P = E+F+G+H Computer Procedure (1) Make a list of pairs of cubes, B and C, and their sum (B+C) for a large range of values for B and C. (2) Sort the list by (B+C) so that entries having the same sum will be grouped together. (3) Scan the list for pairs of entries having matching (B+C) values and make a second list of all possible entries of B+C=Q+M (4) Sort the second list by B so that entries having the same first value will be grouped together. (5) Scan the second list for pairs of entries having matching B values and make a third list of all possible entries of B+C=Q+M B+N=K+G where the 7 values are distinct. (6) Sort the third list by C,N so that entries having the same second values will be grouped together. (7) Scan the third list for pairs of entries having matching C,N values and make a fourth list of all possible entries of B+C=Q+M B+N=K+G P+C=F+J P+N=A+D where the 12 values are distinct and Q+A=G+J M+D=K+F. (8) Sort the fourth list by Q,K,F,A so that entries having the same third values will be grouped together. (9) Scan the fourth list for pairs of entries having matching Q,K,F,A values. B+C=Q+M B+N=K+G P+C=F+J P+N=A+D E+I=Q+r E+H=K+s L+I=F+t L+H=A+u where E,L,I,H are different from B,P,C,N and r = D, s = J, t = G, u = M. Assemble into A B C D E F G H I J K L M N P Q