Consider a productive square of size $n$ to be an $n\times n$ grid filled with a permutation of the integers in $[1, n^2]$, such that the product of all the numbers along the first row is equal to the product of all the numbers along the first column, and the same applys to the second row/column, the third row/column, etc. We already know that 3~6 are solvable, and anything above $10$ is unsolvable (and $9$ is unsolvable as well).

This got me interested: is there a configuration for $7/8/10$?

  • 3
    $\begingroup$ For the 10x10 square, I know the numbers on the diagonal. But that's as far as I can reason it, before having to brute-force it. $\endgroup$ Feb 4 at 13:10

1 Answer 1


Yes, there are solutions for all three.

See https://math.stackexchange.com/a/3518847/683666

  • 1
    $\begingroup$ Thank you for saving me lots of time, and I still wouldn't have found the solutions anyway. Is there anything that cannot be done with integer linear programming? One day I will understand it...maybe. $\endgroup$
    – JLee
    Feb 4 at 16:38
  • 1
    $\begingroup$ @JLee Yes, one thing: puzzling.stackexchange.com/a/125404/65277 $\endgroup$
    – RobPratt
    Feb 4 at 17:12
  • $\begingroup$ @RobPratt my MIP isn't terminating for $N=7$, its running for 6 minutes already... is it normal? $\endgroup$
    – Sny
    Feb 5 at 9:37
  • $\begingroup$ And how exactly should I implement the $\log$ indicated in the answer, since I'm a little worried about rounding issues? $\endgroup$
    – Sny
    Feb 5 at 9:39
  • $\begingroup$ (It works fine for $N=1,2,3,4,5,6$) $N=6$ takes about 1 second. $\endgroup$
    – Sny
    Feb 5 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.