Amidst all this talk about multiplicative magic, somehow I had completely forgotten that, just a few years ago, a paper by Ahmed, De Loera, and Hemmecke calculated the Grobner basis for the polyhedral cone of 4x4 magic squares (math.CO/0201108, "Polyhedral Cones of Magic Cubes and Squares"). According to their result, every 4x4 magic square -- by which we mean the entries are nonnegative integers, and the rows, columns, and main diagonals have the same sum, but *not* that the entries are distint -- is a positive integer linear combination of the following 20 matrices: [ 1 0 0 0 ] [ 0 0 1 0 ] and its seven rotations and reflections; [ 0 0 0 1 ] [ 0 1 0 0 ] [ 1 0 1 0 ] [ 0 0 0 2 ] and its seven rotations and reflections; [ 0 1 1 0 ] [ 1 1 0 0 ] [ 0 0 1 1 ] [ 0 1 0 1 ] and its one rotation; and [ 1 0 1 0 ] [ 1 1 0 0 ] [ 1 0 1 0 ] [ 0 0 1 1 ] and its one rotation. [ 1 1 0 0 ] [ 0 1 0 0 ] The construction I gave originally, with ABCDabcd, generated all the magic squares you could make using only the first eight of these; the corresponding construction with 20 variables will generate every possible multiplicative magic square. (For each of these new matrices, you pick a constant, which is multiplied in each location where the matrix has a 1, and whose square is multiplied in the location of a 2, if any; the magic product is multiplied by the square of the constant.) This doesn't address the distinct entries requirement at all. But ignoring that requirement, you can now conclude, for example, that the number of multiplicative magic squares with magic product p1^e1 * p2^e2 *...* pn^en is just product( binomial( ei+19, ei ) ) over i=1...n. --Michael Kleber -- It is very dark and after 2000. If you continue you are likely to be eaten by a bleen.