4. In the empty fields of the table as shown in the image, eight mutually different single-digit natural numbers must be written so that the sum of the numbers in each row, except for the lowest one, is one greater than the sum of the numbers in the row below it. In how many ways can the table be filled?

![](https://cdn.mathpix.com/cropped/2024_05_30_ff246218007c389a8ad8g-6.jpg?height=294&width=217&top_left_y=110&top_left_x=1636)
## Solution.

From the 9 possible single-digit numbers in the table, one will not be used. The largest possible sum of all used single-digit natural numbers would be obtained by omitting the number 1. Then the sum of all 8 digits would be

$$
2+3+\ldots+8+9=44
$$

The smallest sum would be without the number 9, which would amount to 36.

We conclude that the sum of all 8 numbers is greater than or equal to 36 and less than or equal to 44.

Since the sums of the numbers in the rows are four consecutive numbers, let's denote them as $n, n+1, n+2, n+3$, where $n$ is a natural number. Their sum is $4n+6$. The only numbers of this form between 36 and 44 are 38 and 42.

If the sum of all 8 numbers is 38, it means that in this case the number 7 is omitted because the sum of all 9 numbers is equal to 45. Then $4n+6=38$, so $n=8$, and the sums of the numbers in the rows are $8, 9, 10$, and 11.

Let's examine all possibilities for the given case by first listing the possibilities for each sum.

| sum | possibilities |
| :---: | :---: |
| 8 | $2+6,3+5$ |
| 9 | $1+8,3+6,4+5$ |
| 10 | $1+9,2+8,4+6$ |
| 11 | $2+9,3+8,5+6$ |

We can immediately eliminate the sums $9=3+6$ and $11=5+6$ because without those addends it is not possible to get a sum of 8, and then the sum $10=2+8$ because without those addends it is not possible to get a sum of 11.

Since the same number cannot be written in more than one place in the table, we get two possibilities for the sums in the table:

| sum | I | II |
| :---: | :---: | :---: |
| 11 | $3+8$ | $2+9$ |
| 10 | $1+9$ | $4+6$ |
| 9 | $4+5$ | $1+8$ |
| 8 | $2+6$ | $3+5$ |

If the sum of all 8 numbers is 42, then the number 3 is omitted. Then $4n+6=42$, so $n=9$. The sums of the numbers in the rows are 9, 10, 11, and 12.

Let's examine all possibilities for the given case by first listing the possibilities for each sum.

| sum | possibilities |
| :---: | :---: |
| 9 | $1+8,2+7,4+5$ |
| 10 | $1+9,2+8,4+6$ |
| 11 | $2+9,4+7,5+6$ |
| 12 | $4+8,5+7$ |

We can eliminate the sums $4+5, 4+7$, and $2+8$.

Since the same number cannot be written in more than one place in the table, we get two possibilities for the sums in the table:

| sum | III | IV |
| :---: | :---: | :---: |
| 12 | $5+7$ | $4+8$ |
| 10 | $2+9$ | $5+6$ |
| 9 | $4+6$ | $1+9$ |
| 8 | $1+8$ | $2+7$ |

Since it does not matter in which column we write which addend, for each row we have two ways to write it. Therefore, for each of the given possibilities, the table can be filled in $2 \cdot 2 \cdot 2 \cdot 2=16$ ways.

The total number of ways to fill in the table is $4 \cdot 16=64$.