Magic Product Squares

  1. In the second part of an earlier puzzle, I asked for the smallest product for a 3x3 Magic Product Square. For this puzzle, I'd like to know what the second and third smallest products are, and give an example of each.
  2. What are the smallest and next smallest products in a 4x4 magic product square? Consider just rows, columns and two main diagonals. (For more fun, add in (1) the four corners, (2) each quadrant, and (3) the four center squares.) Give examples.
  3. What are the smallest and next smallest products in a 5x5 magic product square? Consider just rows, columns and two main diagonals. Give examples.

Source: Original. Based on an earlier puzzle and a suggestion from Denis Borris.


Solutions were received from Claudio Baiocchi, Stephane Higueret, Joseph DeVincentis, Philippe Fondanaiche, Denis Borris, Sudipta Das. There were many good approaches to this problem, so I'll include a few of them.
Philippe Fondanaiche provided a good generic approach and I believe found the minimum products.
A way to find a magic product square nxn is to consider n colinear vectors of 
which all the coordinates are represented in a nxn matrix.
For example for a 3X3 magic product square, let consider the vector A:(1,2,4) 
and the vectors B=3*A and C=9*A . We have the matrix:
    1   2   3
   ---------------
A  1   2    4
B  3   6   12
C  9  18   36

A1=1  A2=2  A3=4  B1=3 etc...
Now we transform the matrix such as all the coordinates of each vector are on 
different rows and columns.
For example, with the following transformation:

  C2  A1  B3
  A3  B2  C1
  B1  C3  A2

We get the solution with the smallest product P=216=6^3:
 18   1  12
  4   6   9
  3  36   2

Starting from:
  1    2    4
  5   10   20
 25   50  100
we obtain the product P=1000=10^2 in the following MPS
 50   1   20
  4   10  25
  5   100  2

Starting from:
   1     2      4
   6    12     24
   36   72    144
we obtain the product P=1728=12^3 in the following MPS
   72     1    24
    4    12    36
    6   144     2

etc...


With a 4X4 MPS to be solved, same way of reasoning:
Starting from:
    1     2    3     4
    ------------------
 A  1     2    3     4
 B  5    10    15   20
 C  6    12    18   24
 D  7    14    21   28

With the transformation defined hereafter and characterized by the fact that 
on each column,each row,each diagonal,there are different letters and 
numbers. (This a classical puzzle that you have recently submitted)
     A1  D2  C3  B4
     C4  B3  A2  D1
     B2  C1  D4  A3
     D3  A4  B1  C2
we obtain the product 5040 in the following MPS:
      1    14     18    20
     24    15      2     7
     10     6     28     3
     21     4      5    12

With a 5X5 MPS to be solved, we start from:

       1     2      3      4      5
       ----------------------------
   A   1     2      3      4      6
   B   5    10     15     20     30
   C   7    14     21     28     42
   D   8    16     24     32     48
   E   9    18     27     36     54    

  then we consider the transformation:
      B2   A1   C5    D4   E3
      D5   E4   B3    A2   C1
      A3   C2   D1    E5   B4
      E1   B5   A4    C3   D2
      C4   D3   E2    B1   A5
      
  and finally we get the product 362 880 in the following MPS:
     10     1    42    32    27
     48    36    15     2     7
      3    14     8    54    20
      9    30     4    21    16
      28   24    18     5     6

Best regards.

Claudio Baiocchi found solutions using "atoms" of squares, multiplying two atoms to achieve a the final square:
Concerning the true subject, it is convenient to start with squares that can
have repeated entries.

Taking the (non-negative) entries of a sum-magic square as exponents of a
prime number, we get the "atoms" for our problem: each such atom is a
product-magic square, any product of atoms is again a solution, and any
solution can be decomposed into a product of atoms.

Thus we are faced with the problem of construct families of atoms whose
product gives raise to squares without repeated entries. As happens for the
3X3 square, also in the case 5X5 two atoms suffice; e.g. the atom:
0 1 2 3 4
3 4 1 2 0
4 2 3 0 1
2 0 4 1 3
1 3 0 4 2
as exponents of 2, and the transposed one as exponents of 3. The
corresponding value for the constant product is (2^10)*(3^10), and I believe
it is the minimal one...

Concerning the 4X4 square, something similar could be done but, in any case,
one would end up with (2^6)*(3^6) as constant product; a better value (may
be the best one?) can be reached by using three atoms, e.g.:
0 1 2 3       1 0 1 0     1 0 0 1
2 3 0 1       0 1 0 1     0 1 1 0
1 0 3 2       0 1 1 0     1 0 0 1
3 2 1 0       1 0 1 0     0 1 1 0
as exponents for 2, 3 and 5 respectively; the constant product is
(2^6)*(3^2)*(5^2), and also the 6 "broken diagonals" give raise to the same
product.
----------------------------------
Follow-up 1:

Let me show this on the case of a 4X4 square, where one of my atoms was a
power of 2:

0 1 2 3            1 2 4 8
2 3 0 1            4 8 1 2
1 0 3 2   --->     2 1 8 4
3 2 1 0            8 4 2 1

Such an atom can be splitted as the product of a power-of-2  and a
power-of-4 "sub-atomic particles":

1 2 1 2       1 1 4 4                      0 1 0 1             0 0 1 1
1 2 1 2   *   4 4 1 1   powers of          0 1 0 1     and     1 1 0 0
2 1 2 1       1 1 4 4                      1 0 1 0             0 0 1 1
2 1 2 1       4 4 1 1                      1 0 1 0             1 1 0 0

(I hope the alignment will appear correct.)

This does not affect the result concerning the 4X4 square; however, in the
5X5 case, the idea gives a better result; the optimal 5X5 product-magic
square should be:

1 2 3 4 5      1  11  13   9   7            1   22   39   36   35
4 5 2 3 1      7  13   9   1  11           28   65   18    3   11
5 3 4 1 2  *   9   7  11  13   1    =      45   21   44   13    2
3 1 5 2 4     11   9   1   7  13           33    9    5   14   52
2 4 1 5 3     13   1   7  11   9           26    4    7   55   27

both factors being the product of four (un-breakable) sub-atoms: powers of
2, 3, 4 and 5 the first one, and powers of 7, 9, 11 and 13 the second one!

Of course in the case 3X3 there exist no sub-atomic particles, but in the
4X4 case also the sub-atomic particles I just used are non-minimal...
However it seems to me that the truly-minimal particles are too few to give
better results; thus I hope that now my analysis is complete....

----------------------------------
Follow-up 2:

I want just to remark that also for the 4X4 square something better can be
done. Again as product of only two squares (in order to render easier the
controls), but in fact each factor being obviously the product of three
"truly atomic" squares, we have:

1 2 3 4           1 5 7 9                 1  10   21   36

3 4 1 2           9 7 5 1                27  28    5    2
            *                      =
4 3 2 1           5 1 9 7                20   3   18    7

2 1 4 3           7 9 1 5                14   9    4   15

The solution is less "elegant" (in particular: the 6 broken diagonals give
wrong products) but the constant value for the magic product is smaller!

=======================================

P.S. (Never say never)

Before of sending you this mail, I looked incoming mails, and I found your
last message; in the same spirit, here the "9" can be replaced by "6".

The final product for the 4X4 case seems now optimal; the 5X5 may be
deserves some further improvements...

Before hearing from Claudio, I [Ken] was investigating using the 5x5 magic sum square as a basis. Then by replacing the numbers 1-25 with their base-3 representation and requiring that each of the digits in each direction sum to 5, we could use each digit as the power of a different prime.

That is, if the first digit of the base-3 representation is the exponent of 2, there should be a total of 5 2's in any line. The second digit would be the power of 3, and the third digit would be the power of 5.

I managed to make 5x5 magic sum squares, but I wasn't able to find one where the base-3 digits met this requirement. If anyone finds one, let me know, and I'll add it here.


Stephane Higueret pointed out that any solution for puzzle 2 will solve my suggested additions (1) and (3):
Just a remark for puzzle 2:
if we have
abcd
efgh
ijkl
mnop

As stated

abcd = P (1)
efgh = P (2)
ijkl = P (3)
mnop = P (4)
aeim = P (5)
bfjn = P (6)
cgko = P (7)
dhlp = P (8)
afkp = P (9)
dgjm = P (10)

so
(9), (10), (6), (7), (2) and (3) gives
(fgjk)^3 * abcdehilmnop = p^6 (11)
           ^^^^^^^^^^^^
          (1),(2),(3) and (4) leads to abcdehilmnop * fgjk = P^4 
so (11) => (fgjk)^2 = P^2
fgjk = P

So as stated, condition (3), center square, is included

and (9) and (10) (two diagonals) gives
afkpdgjm = P^2
admp * fgjk = P^2
so admp = P wich is the condition (1), four corners

Mail to Ken