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 computer solution
1. You were requested to provide at least one sample of ant. sq.
2. What about the extra challenge ? For an exhaustive search you need about 6*10^7 times the runtime needed for 3*3 square ( more than 16!/9!)
So maybe we should be satisfied just with evaluating one sample only and not the probability (BTW I DON'T HAVE THE ANSWER)