Let us place at random the digits from 1 to 9 into the cells of 3x3 square.
What is the probability of getting a configuration such that the 8 sums (3 rows, 3 columns and 2 main diagonals) will be represented by 8 distinct numbers?
Construct at least one such square.
Same two tasks for 4x4 square , numbers 1 to 16 and 10 distinct sums.
(In reply to re(2): computer solution
Please check again the wrong sums at the diagonals - apparently the 9th number is stuck at 22.
It would be of interest to hear from you about the nature of the bug and the process of verification.