In the figure, all empty white triangles should be filled with integers such that the sum of the three numbers in the white neighboring triangles of each gray triangle is divisible by 5.

The numbers 12 and 3 are given in the left lower and right lower white triangles, respectively.

Determine all integers that can stand in the top white triangle.

![](https://cdn.mathpix.com/cropped/2024_04_17_9412ce3c68f39656e41ag-03.jpg?height=540&width=622&top_left_y=1689&top_left_x=731)

G. Woeginger, TU Eindhoven, Netherlands
Each number in the filled figure can be replaced by another number in the same residue class modulo 5 without violating the conditions. Therefore, it suffices to calculate all other entries modulo 5 starting from a bottom row with arbitrary middle entries $a, b, c, d$.

So let's assume that in the bottom row, the six numbers are

$$
\text { 12, } \quad a, \quad b, \quad c, \quad d, \quad 3
$$

Then in the row above (taken modulo 5), the five numbers are

$$
-2-a, \quad-a-b, \quad-b-c, \quad-c-d, \quad-d-3 .
$$

In the row above that, the numbers are then

$$
2+2 a+b, \quad a+2 b+c, \quad b+2 c+d, \quad c+2 d+3,
$$

and in the row above that, the numbers are

$$
-2-3 a-3 b-c, \quad-a-3 b-3 c-d, \quad-b-3 c-3 d-3 .
$$

The next row contains

$$
2+4 a+b+4 c+d, \quad a+4 b+c+4 d+3,
$$

and the top triangle finally contains

$$
-(2+4 a+b+4 c+d)-(a+4 b+c+4 d+3) \equiv 0 .
$$

Therefore, in the top corner (completely independently of the values $a, b, c, d$), only multiples of 5 can stand.

Since we have used all conditions in our calculation, they are also satisfied, and all multiples of 5 can actually be achieved.

(Th. Eisenkölbl, G. Woeginger)