On each wall of the dice, we wrote a different prime number less than 20 so that the sums of two numbers on opposite walls were always the same.

![](https://cdn.mathpix.com/cropped/2024_04_17_3f052d529d7f6d768bd1g-1.jpg?height=454&width=403&top_left_y=1578&top_left_x=861)

We placed the dice on the first square of the plan shown in the image. Then we rolled the dice in the indicated direction on the plan. Each time the dice touched the plan, we wrote the number it touched on the corresponding square.

Which of its numbers did the dice not touch the plan with, if the sum of all the written numbers was 86?

(The plan is made up of squares that are the same size as the walls of the dice.)
Prime numbers less than 20 are $2,3,5,7,11,13,17$ and 19. From these, we need to take three pairs with the same sum, which are the pairs $(19,5),(17,7)$ and $(13,11)$. The cube is placed on the plan with some number, which we will denote as $a$. It is possible to discuss all the possibilities regarding the placement of all numbers on the cube, which is unnecessarily laborious. It is simpler to realize which squares the opposite faces of the cube will touch. Let $b$ be the number on the face that the cube touches on the second square of the plan. Then we find that on the first three squares of the plan, we get the following numbers:

| $a$ | $b$ | $24-a$ |
| :--- | :--- | :--- |

Let $c$ be the number on the face that the cube touches on the next square of the plan. The number $c$ must be different from $a, b, 24-b, 24-a$. Now we can fill in all the squares on the plan:

| $a$ | $b$ | $24-a$ |
| :---: | :---: | :---: |
|  |  | $c$ |
| $24-a$ | $b$ | $a$ |
| $24-c$ |  |  |

We can notice that the pairs $a, 24-a$ appear twice on the plan and the pair $c$, $24-c$ once. The sum of these pairs is always 24, and the sum of all the written numbers is:

$$
a+b+(24-a)+c+a+b+(24-a)+(24-c)=3 \cdot 24+2 b=72+2 b
$$

From the value of the sum, we can determine the number $b$: $2 b=86-72=14$, i.e., $b=7$. The cube did not touch the plan with the face opposite to the face with the number 7, so it did not touch the number 17.