7. In how many different ways can we fill the 9 fields of a $3 \times 3$ table with the first 9 natural numbers (one in each field) so that the sums of the numbers written in each row of the table are equal?

The use of a pocket calculator or any reference materials is not allowed.
7. In how many different ways can we fill a $3 \times 3$ table with the first 9 natural numbers (one in each cell) so that the sums of the numbers in each row of the table are equal?

## Solution.

Since the sum of the first 9 numbers is 45, the sum of the numbers in each row must be 15.

First, let's analyze how the first 9 natural numbers can be divided into groups of three numbers each, with the sum of each group being 15. Each such triplet will be written in one row.

In the group containing the number 9, the sum of the remaining two numbers must be 6, so the only two possibilities are 9, 5, 1 or 9, 4, 2.

Next, consider the group containing the number 8; since the sum of the remaining two numbers must be 7, there are three possibilities: 8, 6, 1 or 8, 5, 2 or 8, 4, 3.

If one group consists of 9, 5, 1, then the second group must contain 8, 4, 3, and the third group must be 7, 6, 2.

If one group consists of 9, 4, 2, then the second group must contain 8, 6, 1, and the third group must be 7, 5, 3.

Thus, the only two possible divisions into three groups are:

- 9, 5, 1; 8, 4, 3; 7, 6, 2
- 9, 4, 2; 8, 6, 1; 7, 5, 3

3 POINTS

(1 POINT should be awarded for finding both of the above possibilities, and 2 POINTS for the explanation/proof that there are no other possibilities.)

Three numbers in one row of the $3 \times 3$ table can be written in $3 \cdot 2 \cdot 1 = 6$ ways.

1 POINT

Since we have three rows, for a fixed distribution of numbers by rows, the three rows can be filled in $6 \cdot 6 \cdot 6 = 216$ ways,

and since the three rows can be arranged in $3 \cdot 2 \cdot 1 = 6$ ways,

for a fixed division into three groups, there are $216 \cdot 6 = 6^4 = 1296$ possibilities for filling.

In total, considering that we have two possible divisions into groups, the number of possibilities is $2 \cdot 6^4 = 2592$.