## Ultramagic square

Posted on: February 11th, 2014 by
2

A 9x9 grid is filled with numbers from 1 to 81, each number occurring exactly once. The grid is said to be ultramagic if the product of numbers in row k is equal to the product of numbers in column k for each k. Can you construct an ultramagic grid?

- via AMS puzzle corner

#### 2 Responses to Ultramagic square

No such grid exists. This can be seen from the location of the primes in the grid. Let a prime $p$ be located in position $(i,j)$ for $j \neq i$. Then, the ith row product is divisible by $p$. The grid construction rule then stipulates that the $j$ column is also divisible by $p$. This is only possible if a multiple of $p$ ($2p,3p...$) is located on the jth column. Particularly, it is not possible for any prime above $81/2$. So, the primes between 41 and 81 cannot lie on the off-diagonal. But there are 10 of them and only 9 diagonal locations.
For a general $n$, the above argument yields a necessary condition $\pi(n^2) - \pi(\lfloor \frac{n^2}{2} \rfloor) \leq n$ which rules out $n \geq 11$. Here $\pi(.)$ is the prime counting function. It will be very surprising if any ultramagic squares exist at all.