Problem 1. Three years ago the age of Punto's mum was three times the age of Punto. Now the age of Punto's dad is three times the age of Punto. What is the difference of ages of Punto's parents in years? Result. 6 Solution. If $x$ denotes the current age of Punto, then the current age of Punto's mum is $3(x-3)+3$, which is $3 x-6$. According to the second statement, Punto's dad is currently $3 x$ years old. Therefore, the difference of the parents' ages is 6 years. Problem 2. How many triangles are there in the picture? ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-01.jpg?height=254&width=580&top_left_y=524&top_left_x=744) Result. 30 Solution. All the triangles in the picture have the topmost point as a vertex. Further, one side of all the triangles lies completely on one of the two parallel horizontal line segments. Therefore, each triangle is determined by a choice of one of the two horizontal segments and two distinct vertices on that segment. Since there are six vertices on each segment, the number of triangles is $$ 2 \cdot(5+4+3+2+1)=30 $$ Problem 3. A point $E$ inside a square $A B C D$ is such that $A B E$ is an equilateral triangle. What is the size of the angle $D C E$ in degrees? ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-01.jpg?height=388&width=443&top_left_y=1205&top_left_x=812) Result. 15 Solution. Since in an equilateral triangle each internal angle is $60^{\circ}$, we get $\angle C B E=90^{\circ}-\angle E B A=30^{\circ}$. Due to $E B=A B=B C$, the triangle $B C E$ is isosceles and we obtain $$ \angle E C B=\angle B E C=\frac{1}{2}\left(180^{\circ}-\angle C B E\right)=75^{\circ} $$ Finally, the size of the angle sought after is $\angle D C E=90^{\circ}-\angle E C B=15^{\circ}$. Problem 4. Little Sandi owns a big treasure chest containing a lot of labelled coins: one coin labelled with 1 , two coins labelled with $2, \ldots$, eighteen coins labelled with 18 , and nineteen coins labelled with 19. Sandi takes one coin after the other out of her treasure chest without being able to read its label. What is the minimum number of coins Sandi has to take out if she wants to make sure she has ten identically labelled coins? Result. 136 Solution. By chance Sandi might have taken all coins with labels less than 10 and nine coins each of those with labels from 10 to 19. In total, this amount of coins is $(1+2+\cdots+9)+9 \cdot 10=135$. Therefore, taking out 135 coins does not guarantee getting ten equally labelled ones. However, if Sandi takes out 136 coins, at least 91 coins show labels greater than 9. By the pigeonhole principle, one of the ten types of coins with labels 10 to 19 has been taken out at least ten times. Therefore, the minimum number of coins is 136 . Problem 5. Mr. Sugar bought a big box of his favourite Halloween candies to hand out to trick-or-treaters. However, he ate half of all the candies himself before the first child came and took her share. He ate half of what was left before the second child came, and half of what was left again before the third child came and took all of the remaining candies. If each child received exactly three candies, how many candies did Mr. Sugar originally buy? Result. 42 Solution. If $n$ is the number of candies bought originally, then we can rewrite the distribution of the candies via the equation $$ \left(\left(\frac{n}{2}-3\right) \cdot \frac{1}{2}-3\right) \cdot \frac{1}{2}-3=0 $$ Solving for $n$ yields $n=42$. Problem 6. Let $A B C D$ be a quadrilateral with right angles at $A$ and $C$. Given the lengths $B C=6, C D=8$, and $D A=2$, find the area of the quadrilateral $A B C D$. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-02.jpg?height=248&width=351&top_left_y=727&top_left_x=858) Result. $24+4 \sqrt{6}$ Solution. By the Pythagorean theorem, we get $B D=\sqrt{6^{2}+8^{2}}=10$ and using this result we obtain $$ A B=\sqrt{B D^{2}-A D^{2}}=\sqrt{10^{2}-2^{2}}=\sqrt{96}=4 \sqrt{6} $$ Hence, the area of the quadrilateral $A B C D$ is $$ \frac{1}{2}(6 \cdot 8+2 \cdot 4 \sqrt{6})=24+4 \sqrt{6} $$ Problem 7. An office printer can print either on one side or on both sides. One-sided printing takes three seconds per page, whereas two-sided takes nine seconds per sheet. Kate wants to print a research paper eighteen pages long, printing on both sides of the paper. She can either print all the pages two-sided or print only the odd pages, manually put the sheets back into the printer, and print the even pages. She quickly realizes that both procedures would take the same time. How many seconds does it take her to put the sheets back into the printer? Result. 27 Solution. We know that Kate wants to print on nine sheets of paper. When using the duplex capability of the printer, printing takes $9 \cdot 9=81$ seconds. On the other hand, when printing the sides separately, every sheet gets printed twice so that the printing itself takes $2 \cdot 3 \cdot 9=54$ seconds. Hence, the manual part of the job has to take $81-54=27$ seconds. Problem 8. Find all 9-digit numbers $A$ which satisfy the following conditions: - It contains each digit $1, \ldots, 9$ exactly once. - Any two-digit number which is formed of neighbouring digits of $A$ while keeping their order is divisible by 7 or 13 . Result. 784913526 Solution. Let us arrange the digits $1, \ldots, 9$ into a diagram, adding an arrow from $x$ to $y$ if the two-digit number $\overline{x y}$ is divisible by 7 or 13 . ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-02.jpg?height=500&width=713&top_left_y=2183&top_left_x=680) (The solid arrows stand for divisibility by 7 , the dashed ones for 13 , and the dash-dotted one for divisibility by both numbers.) It is clear from the diagram that the number in question has to begin with digits 784 . If the next digit is 9 , then we have to go on with 1,3 , and 5 , and the remaining two digits have to be in the order 2,6 . This way we obtain the solution 784913526 . If, on the other hand, we carry on as 7842 , there are two cases two consider. Firstly, continuing to 1 and subsequently 3 , there is no way for the number to contain both 5 and 9 . Secondly, we run into the same issue when carrying on as 784263, so the solution above is the only one. Problem 9. Two squares are inside a larger square as in the picture. Find the area of the square $A$ if the area of the square $B$ is 48 . ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-03.jpg?height=302&width=305&top_left_y=543&top_left_x=881) Result. 54 Solution. Since the triangles adjacent to the sides of square $B$ are isosceles, the side of $B$ lying on the diagonal is precisely the middle third of the diagonal. Therefore, if $s$ is the side length of the large square, the side length of $B$ is $\frac{1}{3} \cdot \sqrt{2} \cdot s$ and the one of $A$ is $\frac{1}{2} \cdot s$. Therefore, the area ratio of the inscribed squares is $$ \frac{s^{2}}{4}: \frac{2 \cdot s^{2}}{9}=\frac{9}{8} $$ so the area of square $A$ is $48 \cdot \frac{9}{8}=54$. Problem 10. Fiona has two cubes, one of side length $9 \mathrm{~cm}$ composed of white unit cubes (i.e. cubes of side length $1 \mathrm{~cm}$ ), and one of side length $10 \mathrm{~cm}$ composed of black unit cubes. With these unit cubes she wants to build up a cube of side length $12 \mathrm{~cm}$. At least how many $\mathrm{cm}^{2}$ of the surface have to be black? Result. 0 Solution. Fiona has $9^{3}=729$ white and $10^{3}=1000$ black unit cubes. In order to build up the surface of a cube of side length 12 she needs $12^{3}-10^{3}=1728-1000=728$ unit cubes. As a consequence, she can compose a cube of side length 12 with all six faces being completely white. Therefore, the answer is 0 . Problem 11. After marking a mathematics test, the teacher found out that exactly ten of his pupils could not multiply fractions, fourteen of them could not add them, and seventeen could not rationalise them. Moreover, every student lacked at least one of the skills and there were exactly six pupils who lacked all three of them. At most how many pupils attended the class? Result. 29 Solution. In order to find out the size of the class precisely, we would also need the information about how many students lack two of the skills for each pair of the skills. However, it is easy to see that we obtain the largest number if we assume that everyone who lacks at least two skills in fact lacks all three of them. In that scenario, the total number of pupils is $$ 10+14+17-2 \cdot 6=29 $$ We have to subtract the number of totally unskilled pupils twice, since when adding the sizes of the three other groups, we count these pupils three times. Problem 12. One of the angles of a right-angled triangle is $23^{\circ}$. Find the angle (in degrees) between the median and the altitude lines both drawn from the right angle. Result. 44 Solution. Let $A B C$ be a triangle with $\angle B A C=90^{\circ}$. Connect $A$ with the midpoint $M$ of $B C$ to get the median, draw the altitude from $A$, and denote its intersection with $B C$ by $H$. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-03.jpg?height=337&width=780&top_left_y=2347&top_left_x=638) By the theorem of Thales, the vertices of triangle $A B C$ lie on a circle with center $M$. W.l.o.g. let $\angle C B A=23^{\circ}$. Since triangle $A B M$ is isosceles, we also have $\angle B A M=23^{\circ}$. Furthermore, triangle $A H C$ is similar to triangle $A B C$. This yields $\angle H A C=23^{\circ}$. Finally, we get $\angle M A H=90^{\circ}-2 \cdot 23^{\circ}=44^{\circ}$ for the measure of the desired angle. Problem 13. Positive integers $a$ and $b$ satisfy $20 a+19 b=365$. Find the value of $20 b+19 a$. Result. 376 Solution. Clearly, we have $a, b \leq 20$. Adding $b$ to both sides of the given equation we get $20(a+b)=365+b$. Now the left-hand side is divisible by 20 , hence the right-hand side must equal 380 . This yields $b=15$, hence $a=4$ and we just need to compute $20 b+19 a=380-a=376$. Problem 14. A regular polygon with 2018 vertices has 2,033,135 diagonals. How many more diagonals are there in a regular polygon with 2019 vertices? Note that in both cases, we do not count the sides of the polygon as diagonals. Result. 2017 Solution. The regularity of the polygons involved plays no role and we may assume that the 2019-gon is made from the 2018-gon by dividing one of the edges by a new vertex. This new vertex is connected by 2016 new diagonals to 2016 non-neighbor vertices and there is also one new diagonal connecting its two neighbors, so in total, the numbers of diagonals increases by 2017 . Problem 15. Find all real solutions of the equation $\left(x^{2}-4 x+5\right)^{x^{2}+x-30}=1$. Result. $2,5,-6$ Solution. Since $x^{2}-4 x+5=(x-2)^{2}+1 \geq 1$, the base is always a positive real number. Hence the only possibilities to fulfill the equation are the base equals 1 or the exponent equals 0 . In the first case, $x^{2}-4 x+5=1$ is equivalent to $(x-2)^{2}=0$ which yields $x=2$. In the second case, $x^{2}+x-30=(x-5)(x+6)=0$ has the two solutions $x=5$ and $x=-6$. All in all, there are three solutions. Problem 16. How many permutations of numbers $1,2,3,4$ are such that whenever we erase one of the numbers, the remaining sequence of numbers is neither increasing nor decreasing? Note: A permutation is a sequence containing each of the numbers exactly once. ## Result. 4 Solution. Suppose 1 is the starting number. In order to comply with the condition about increasing, the permutation has to be $(1,4,3,2)$. But since erasing 1 yields a decreasing sequence of numbers, this permutation does not fulfill the given conditions. Therefore, 1 cannot be the starting number, and by symmetry it cannot be the ending number, too. Similarly, 4 cannot be neither the first nor the last number. Hence 1 and 4 must be in the middle. Both orders $(1,4)$ and $(4,1)$ yield two valid permutations: $$ (2,1,4,3),(3,1,4,2),(2,4,1,3),(3,4,1,2) $$ Therefore there are four permutations which satisfy the conditions. Problem 17. Let $A B C D$ be a rectangle with $A B=8 \mathrm{~cm}$ and $B C=6 \mathrm{~cm}$. Further let $X$ and $Y$ be the intersections of the perpendicular bisector of $A C$ with $A B$ and $C D$, respectively. What is the length of $X Y$ (in centimeters)? Result. $\frac{15}{2}$ Solution. By the Pythagorean theorem, we get $A C=\sqrt{A B^{2}+B C^{2}}=\sqrt{8^{2}+6^{2}}=10$. Let $S$ be the intersection of $A C$ and its perpendicular bisector. Clearly, $S$ is the midpoint of the diagonal, i.e. we have $A S=5$. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-04.jpg?height=434&width=554&top_left_y=1985&top_left_x=751) Since $\angle C A B=\angle S A X$ and $\angle X S A=\angle C B A=90^{\circ}$, triangles $A S X$ and $A B C$ are similar, yielding $S X: A S=B C: A B$ or $$ S X=\frac{B C \cdot A S}{A B}=\frac{15}{4} $$ Finally, the length we are looking for is $X Y=2 \cdot S X=\frac{15}{2}$. Problem 18. In the cryptarithm FOUR $+F I V E=N I N E$ each letter represents only one digit throughout the problem and different letters represent different digits. Furthermore, it is known that - FOUR is divisible by four, - FIVE is divisible by five, - NINE is divisible by three. Find all possible values of $N I N E$. Result. 3435 Solution. By looking at the units digits, we immediately get $R=0$. Since $F I V E$ is divisible by 5 and $R=0$, we must have $E=5$. From the hundreds digits and knowing that the digit 0 already is taken, we conclude $O=9$ and get a carry of 1 from the tens digits and one into the thousands digits. Therefore, $U+V$ must be greater than 10 and $N$ has to be an odd digit greater than 1 . On the other hand, $U+V \leq 7+8=15$ because the digit 9 is already taken. This limits the possibilities for $N$ to $N=3$. Consequently, $U=6$ (because of the divisibility by 4 ), $V=7$ and $F=1$. Since $N I N E$ is divisible by 3 , its digit sum $N+I+N+E=3+I+3+5=11+I$ must be divisible by 3 , too. Out of the three digits 1,4 and 7 which would be suitable for $I$, only $I=4$ is still available. Therefore, the answer is $N I N E=3435$ and the cryptarithm translates into $1960+1475=3435$. Problem 19. Let $A B C$ be an equilateral triangle and $C D E F$ a square such that $E$ lies on segment $A B$ and $F$ on segment $B C$. If the perimeter of the square equals 4 , what is the perimeter of triangle $A B C$ ? ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-05.jpg?height=351&width=394&top_left_y=1038&top_left_x=840) Result. $3+\sqrt{3}$ Solution. Denote further by $G$ the intersection of $A C$ and $D E$. Note that the two right-angled triangles having interior angles $30^{\circ}, 60^{\circ}$, and $90^{\circ}$, i.e. $B E F$ and $G C D$ are congruent, since they both have one side of length 1 of the square in common. Such a right triangle is half of an equilateral triangle with its side length being the length of the hypotenuse of the triangle. Therefore $B E=2 B F$ and by the Pythagorean theorem, $B E^{2}=E F^{2}+B F^{2}$. Together with the fact $E F=1$ we obtain $B F=\sqrt{3} / 3$. Therefore, the side length of triangle $A B C$ is $1+\sqrt{3} / 3$ and its perimeter is $3+\sqrt{3}$. Problem 20. Let $a, b$ be real numbers. If $x^{3}-a x^{2}+588 x-b=0$ has a triple real root, what are the possible values of $a$ ? Result. $42,-42$ Solution. If $r$ is the triple root, then $$ (x-r)^{3}=x^{3}-3 r x^{2}+3 r^{2} x-r^{3}=x^{3}-a x^{2}+588 x-b $$ Comparing the coefficients yields $3 r^{2}=588$ or $r= \pm 14$. Hence we get $a= \pm 42$. Problem 21. Simon is on a trip to islands which are connected by toll bridges as shown in the diagram. There is a unique view from each bridge, so he wants to cross every bridge. Since he likes to save money, he intends to cross every bridge exactly once. In how many ways can he plan the trip if he starts on the square-island? Simon cannot jump from one bridge to another when he is not on an island and he can visit any island any number of times. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-05.jpg?height=303&width=394&top_left_y=2290&top_left_x=840) Result. 120 Solution. Note that the square island and the rightmost island in the middle are two 'special' islands: All bridges start in one of them, and from each 'usual' island there are bridges to both of the special islands. So, we always go from one of the special islands to the other through one of the usual islands. Therefore, all we need to determine the journey is to order the usual islands, which can be done in $5!=120$ ways. Problem 22. How many ordered pairs of positive integers $(m, n)$ are there such that their least common multiple is equal to 2000 ? Result. 63 Solution. Let us distinguish two cases: Firstly, assume that none of the numbers equals $2000=2^{4} \cdot 5^{3}$. Then one of the number is equal to $2^{4} \cdot 5^{k}$ for any $k \in\{0,1,2\}$ and the other one to $2^{l} \cdot 5^{3}$ for any $l \in\{0,1,2,3\}$, hence there are 24 such pairs (counting both possible orderings). Secondly, if one of the numbers is 2000, then the other number can be any divisor of 2000 and there are $(4+1) \cdot(3+1)=20$ of them, so when taking the ordering into account, we obtain $2 \cdot 20-1=39$ pairs; we subtract one for the pair $(2000,2000)$, which is counted twice. In total, there are $24+39=63$ pairs. Problem 23. Let $A B C D E F G H$ be a regular octagon with $A C=7 \sqrt{2}$. Determine its area. Result. $98 \sqrt{2}$ Solution. Let $M$ be the center of the circumcircle of the given octagon. Since $\angle A M C=\frac{2}{8} \cdot 360^{\circ}=90^{\circ}$, the radius of the circumcircle has to be 7 and the diameter is 14 . ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-06.jpg?height=345&width=351&top_left_y=1004&top_left_x=858) Due to the area rearrangement shown in the picture we get the area by multiplying $A C$ with the diameter. Therefore the area sought is $14 \cdot 7 \sqrt{2}=98 \sqrt{2}$. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-06.jpg?height=360&width=351&top_left_y=1459&top_left_x=858) Problem 24. Four friends decided to start learning languages. The local language schools offers courses of Arabic, Bengali, Chinese, and Dutch, and each friend wants to learn exactly three of those languages. In how many ways can they pick the courses such that they all attend at least one course together? Result. 232 Solution. Firstly note that a triple of languages can be assigned to a single person in exactly four ways-we can equivalently choose the language the person is not going to learn. Hence there are $4^{4}=256$ ways of assigning the triples of languages to four people when disregarding the extra condition. Let us now count the assignments causing that the four people have no course in common. The only possibility is that for each of the four languages, there is a person not attending the course. Hence there are $4!=24$ assignments. We conclude that the number of assignments satisfying the given condition is $256-24=232$. Problem 25. Having been told a positive integer $n$ with non-zero digits, Abigail multiplied $n$ by a number containing the same digits, but in reversed order. She noticed that the result was one thousand more than the product of the digits of $n$. Find all possible values of $n$. Result. 24,42 Solution. Clearly, $n$ has at least two digits. If $n$ has precisely two non-zero digits $a$ and $b$, then the given statement translates into $$ (10 a+b)(10 b+a)=1000+a b $$ or $$ a^{2}+b^{2}=10(10-a b) $$ Since the right hand side has to be positive, we get $a b<10$. Therefore we have to work out only a couple of cases obtaining that $a, b$ are 2 and 4 in some order. Finally, if $n$ has $k \geq 3$ digits, then the left-hand side of the equality is at least $\left(10^{k-1}\right)^{2}$, whereas the right-hand side is less than $1000+10^{k}$. As a consequence, $n$ cannot have more than two digits. Problem 26. Let $A B C D$ be a parallelogram and let $T$ be an interior point of $A D$ such that the straight line through $T$ and $C$ is the bisector of $\angle B C D$. Further, let $E$ be a point on $A B$ such that $\angle A E T=40^{\circ}$. If $\angle C T E=75^{\circ}$, what is $\angle C D A$ (in degrees)? Result. 110 Solution. Let $S$ be a point on $B C$ such that $T S$ is parallel to $A B$. Then $\angle E T S=40^{\circ}$ and $$ \angle D C T=\angle S T C=\angle C T E-\angle S T E=35^{\circ} $$ Since $C T$ is the bisector of $\angle D C B$, triangle $C T S$ is isosceles, $\angle D C T=\angle T C S$ and $\angle D C B=2 \cdot 35^{\circ}=70^{\circ}$. Hence $\angle C D A=180^{\circ}-\angle D C B=110^{\circ}$. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-07.jpg?height=600&width=736&top_left_y=1045&top_left_x=660) Problem 27. Two large noble houses met at a feast, both represented by at least one male and at least one female member. Each member of a house greeted each member of the other house: When two men greeted each other, they shook hands, whereas two women or a woman and a man bowed to each other. When the greeting was over, altogether 85 handshakes and 162 bows had happened. How many women were present at the feast? We count it as one bow when two people bow to each other. Result. 10 Solution. Let $m_{1}, m_{2}, w_{1}, w_{2}$ be the number of men and women in the houses, respectively. Since $m_{1} m_{2}=85=5 \cdot 17$, we see that w.l.o.g. $m_{1}=5$ and $m_{2}=17$ (the possibility with one of the numbers being 1 is easily excluded). Furthermore, there were $85+162=247$ greetings altogether, and from $$ \left(m_{1}+w_{1}\right)\left(m_{2}+w_{2}\right)=247=13 \cdot 19 $$ we obtain $m_{1}+w_{1}=13, m_{2}+w_{2}=19$ (the other factorizations are again easily excluded), hence $w_{1}=8, w_{2}=2$ and the answer is $8+2=10$. Problem 28. Consider a triangle with side lengths 10, 24, and 26. Let $c$ be a circle with its centre on the longest side and tangent to the two shorter sides. Find the radius of the circle $c$. Result. 120/17 Solution. The Pythagorean theorem shows that the triangle is a right triangle. The segment connecting the vertex of the right angle with the centre of the circle splits the original triangle into two triangles. The radii to the tangent points are perpendicular to the shorter sides of the triangle, hence they are altitudes in the smaller triangles. Let $r$ be the radius of circle $c$. We calculate the area of the original triangle in two ways, using the known dimension of the original triangle and the smaller triangles: $$ S=\frac{1}{2} \cdot 24 \cdot 10=\frac{1}{2} \cdot 24 \cdot r+\frac{1}{2} \cdot 10 \cdot r $$ which implies $r=120 / 17$. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-08.jpg?height=334&width=394&top_left_y=398&top_left_x=840) Problem 29. Margarita came to a casino with $10 €$. A slot machine in the casino works as follows: The gambler inserts $1 €$ using any coins and with probability $p$ she wins the jackpot; otherwise it returns $0.5 €$. Help Margarita find the smallest probability $p$ such that if she decides to play this slot machine as long as possible or until winning the jackpot, she will have at least $50 \%$ chance of winning the jackpot. Result. $1-\sqrt[19]{0.5}$ Solution. Note that Margarita can play the machine unsuccessfully at most 19 times, since after spending her last $1 €$ she will have only $0.5 €$ left, which is less than the machine accepts. The probability of each loss is $1-p$, therefore the probability of not winning the jackpot is $(1-p)^{19}$. In order to have at least $50 \%$ chance of winning the jackpot, $(1-p)^{19} \leq 0.5$ has to hold, which is equivalent to $p \geq 1-\sqrt[19]{0.5}$ and $1-\sqrt[19]{0.5}$ is the sought smallest value of $p$. Problem 30. Find all four-digit positive integers $\overline{a b c d}$ which are equal to $a^{a}+b^{b}+c^{c}+d^{d}$. None of the digits may be zero. Result. 3435 Solution. As $6^{6} \geq 10000$, none of the digits may exceed 5 . On the other hand, if all the digits were 4 , the equation would not hold, and if there were at most three 4's, the number would be at most $3 \cdot 4^{4}+3^{3}<1000$. Therefore one of the digits has to be 5 . Since $5^{5}=3125$, we see that the digit 5 has to appear exactly once, for if not, the first digit of the number would have been greater than 5 . Now $3000<5^{5}<5^{5}+3 \cdot 4^{4}<4000$, hence the first digit of the number is 3 . At this moment we know that the number in question is at least $5^{5}+3^{3}+2 \cdot 1^{1}=3154$, which does not work and neither does 3155. The next number not containing zeros and digits exceeding 5 is $3211>5^{5}+3 \cdot 3^{3}$, therefore one of the digits has to be 4 . There cannot be another 4 since that would make the second digit exceed 5 and working out the three remaining cases, we conclude that the only solution is 3435 . Problem 31. How many quintuples of two-digit numbers are there such that each of the digits 0 to 9 appears exactly once and each of the two-digit numbers is even, but not divisible by three? Quintuples which differ only by the order of numbers are considered equal. Result. 16 Solution. All the five numbers have to end with an even digit. To satisfy the non-divisibility by three, numbers ending with 0 or 6 have to start with one of $1,5,7$, those ending with 2 or 8 have to start with one of $3,5,9$, and the one ending with 4 has to start with one of $1,3,7,9$. If we pick the number ending with 4 to be 14 , then there are only two choices for the tens digit for 0 and 6 (either 50,76 , or 56,70 ), and consequently, there are only two choices for the tens digit for 2 and 8 (either 32 , 98, or 38,92 ), hence four options in total. A similar argument applies for whatever choice of the tens digit for 4 , and since there are four digits to choose from, the total number of quintuples is $4 \cdot 4=16$. Problem 32. Find all positive integers $n$ such that $$ \left\lfloor\frac{n}{5}\right\rfloor+\left\lfloor\frac{n}{7}\right\rfloor+\left\lfloor\frac{n}{35}\right\rfloor=2019 $$ Note: The expression $\lfloor x\rfloor$ denotes the integer part of $x$, i.e. the greatest integer not exceeding $x$. Result. 5439 Solution. Let $$ f(n)=\left\lfloor\frac{n}{5}\right\rfloor+\left\lfloor\frac{n}{7}\right\rfloor+\left\lfloor\frac{n}{35}\right\rfloor $$ Clearly, $f$ is a non-decreasing function of $n$. Further, $f(n)-f(n-1)=1$ if $n$ is divisible by exactly one of the numbers 5 or 7 , and $f(n)-f(n-1)=3$ if $n$ is divisible by 35 ; in all the other cases $f(n)=f(n-1)$ holds. Since $$ f(n) \leq\left(\frac{1}{5}+\frac{1}{7}+\frac{1}{35}\right) n=\frac{13}{35} n $$ we obtain an estimate for the solution $$ n \geq \frac{35}{13} \cdot 2019 $$ and since $n$ is an integer, $n \geq 5436$. Now $f(5436)=2018$; the closest larger number divisible by 5 is 5440 and the one divisible by 7 is 5439 , hence by the above, $f(5439)=2019, f(5440)=2020$, and 5439 is the only solution. Problem 33. For how many positive integers $n$ can one find positive integers $x, y \leq 1000000$ (not necessarily distinct) such that $$ n=S(x)=S(y)=S(x+y) $$ where $S(a)$ denotes the sum of digits of $a$ ? Result. 6 Solution. Since for any positive integer $a, S(a)$ and $a$ leave the same remainder after division by 9 , we infer from the statement that the numbers $n, x, y$, and $x+y$ leave the same remainder after division by 9 . This implies that $x$ and consequently $n$ have to be a multiple of 9 . If $n=9 m$ for a positive integer $m$, then for the choice $x=y=10^{m}-1$ we obtain the equality from the statement. The largest digit sum for numbers at most one million is 54 , so there are six such $n: 9,18,27,36,45$, and 54 . Problem 34. A pentomino composed of five squares of side length $a$ is inscribed in a rectangle of dimensions $7 \times 8$ as in the picture: ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-09.jpg?height=277&width=234&top_left_y=1295&top_left_x=911) Find $a$. Result. $\sqrt{5}$ Solution. Let $c$ and $d$ be the length of the longer and shorter projection of a side of a square onto a side of the box, respectively. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-09.jpg?height=505&width=460&top_left_y=1758&top_left_x=798) Then $$ \begin{array}{r} 3 c+2 d=8 \\ 3 c+d=7 \end{array} $$ therefore $c=2$ and $d=1$. Using the Pythagorean theorem we deduce that $$ a=\sqrt{c^{2}+d^{2}}=\sqrt{5} $$ Problem 35. Paul has a rectangular 5 by 3 bar of chocolate. He has put extra sugar on the top left square to make it sweeter. He proceeds to eat the chocolate in the following way: In each step he randomly chooses either eating the rightmost column, or the lowest row, both options having the same probability $1 / 2$. He repeats these steps until he has eaten the whole chocolate. What is the probability that in the very last step, he eats only the sweeter square? Result. $15 / 64$ Solution. Assume that the chocolate has three columns and five rows. We may view the process as follows: Paul picks a sequence of C's and R's of total length $(5-1)+(3-1)=6$, and based on this sequence, he eats the columns or rows of the chocolate. There are two possibilities: Either the sequence contains exactly two C's (and four R's), in which case only the sweeter square remains after the process, or the number of C's or R's is at least the number of columns or rows, respectively, which leads to the whole chocolate being eaten. In the latter case, the last step cannot consist of eating solely the sweeter square, since there are not enough columns or rows eaten to reduce the last row or column to a single square. There are $2^{6}$ sequences of C's and R's (of length 6 ) in total, out of which $\binom{6}{2}$ contain exactly two C's, hence the sought probability is $$ \frac{\binom{6}{2}}{2^{6}}=\frac{15}{64} $$ Problem 36. Using each digit $1, \ldots, 9$ exactly twice, Greg formed several pairwise distinct prime numbers so that the sum of these primes was the minimal possible. What was the value of the sum? Result. 477 Solution. No prime numbers except 2 and 5 may end with a 5 or an even digit, therefore each of the digits $$ 2,5,4,4,6,6,8,8 $$ has to appear at least on the tens position of some number in Greg's set. Further, each of the remaining digits $$ 2,5,1,1,3,3,7,7,9,9 $$ has to appear at least on the units position of some number in Greg's set. Therefore the sum is at least $$ 10(2+5+4+4+6+6+8+8)+2+5+1+1+3+3+7+7+9+9=477 $$ On the other hand, this sum is achievable by forming the prime numbers as follows: $$ 2,5,29,53,41,47,61,67,83,89 $$ Problem 37. Tom and Jerry have two polynomials $T(x)=x^{2}+2 x+10$ and $J(x)=x^{2}-8 x+25$. When each of them substituted their favourite positive integer $t, j$ into their respective polynomial they got the same result, i.e. $T(t)=J(j)$. Find all possible values of $|t-j|$. Result. 1,5 Solution. Factoring the left-hand side of the equation $T(t)-J(j)=0$ produces $(t+j-3)(t-j+5)=0$ and therefore either $\{t, j\}=\{1,2\}$ or $|t-j|=5$. Problem 38. The altitude from vertex $A$ of triangle $A B C$ has the same length as the median from vertex $B$. Moreover, we know that the angle $A B C$ equals $75^{\circ}$. Find the ratio $A B: B C$. Result. $\quad \frac{\sqrt{2}}{2}=\frac{1}{\sqrt{2}}$ Solution. Define $E$ as refection of $B$ with respect to the midpoint $M$ of $A C$ and $F$ the perpendicular projection of $E$ on line $B C$. Then it follows from the first given condition that $\sin (\angle E B C)=\frac{E F}{B E}=\frac{1}{2}$ and thus $\angle E B C=30^{\circ}$ (it cannot be obtuse because of the second given condition). Hence $\angle A B M=\angle A B E=75^{\circ}-30^{\circ}=45^{\circ}$. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-10.jpg?height=374&width=625&top_left_y=2303&top_left_x=721) From the law of sines in triangles $A B M$ and $C B M$ we compute $$ \frac{B M}{\sin (\angle B A C)}=\frac{A M}{\sin 45^{\circ}}=\frac{A M}{\frac{\sqrt{2}}{2}} $$ and $$ \frac{B M}{\sin (\angle B C A)}=\frac{C M}{\sin 30^{\circ}}=\frac{A M}{\frac{1}{2}} $$ By dividing these equalities (note that $A M=C M$ ) and using the law of sines in triangle $A B C$ we finally get $$ \frac{A B}{B C}=\frac{\sin (\angle B C A)}{\sin (\angle B A C)}=\frac{\sqrt{2}}{2} $$ Problem 39. In noughts and crosses, two players alternately put noughts and crosses into a 3 by 3 table. One of them wins if there are three of his symbols in a row, column, or a diagonal. The game ends in a draw if the table is completely filled and neither of the players won. How many different arrangements of the table are possible in the case of a draw? We do not identify arrangements differing by rotating or reversing the table. Either of the players can start the game. Result. 32 Solution. We consider four separate cases according to the symbol in the middle square and the symbol which appears five times in the table. If there is a cross in the middle square and there are five crosses in the table (we call this the case "Cross-Cross") we must put four more crosses into the table. We can not use any whole diagonal and any whole "axis". Consequently we end up with a pattern (Figure 1) which is not symmetric with respect to any rotation or axial symmetry and therefore this case contributes with 8 different draw endings. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-11.jpg?height=357&width=351&top_left_y=1221&top_left_x=858) Figure 1 In the case "Cross-Nought" we have to place five noughts in the table with cross in the middle. We can not use all four corners since the fifth would make noughts win. On the other hand we have to put at least one nought on both diagonals, otherwise the crosses win. Hence we have to put either exactly three noughts or exactly two noughts in the corner squares and in both these subcases we have exactly one possibility to complete the table to a draw ending. Both of them are one of the 4 rotations (both have an axis of symmetry) of one of the patterns (Figure 2 and Figure 3). ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-11.jpg?height=339&width=348&top_left_y=1895&top_left_x=634) Figure 2 ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-11.jpg?height=343&width=348&top_left_y=1896&top_left_x=1088) Figure 3 The cases "Nought-Nought" and "Nought-Cross" are analogous to the two cases discussed above and thus the total number of draw endings is $2(8+4+4)=32$. Problem 40. Find the largest positive integer $a$ such that no positive integer $b$ satisfies $$ \frac{4}{3}<\frac{a}{b}<\frac{25}{18} $$ Result. 32 Solution. Taking reciprocals we obtain $$ 0.72<\frac{b}{a}<0.75 $$ The interval between 0.72 and 0.75 has length $0.03>1 / 34$, hence for all $a \geq 34$ there is a solution. For $a=33$ there is a solution $b=24$ (giving $b / a=0.7272 \ldots$ ). For $a=32$ there is no solution as $24 / 32=0.75$ and $1 / 32>0.03$. Problem 41. On a bicycle tour of length $110 \mathrm{~km}$ from Passau to Linz, Heiko and Eva have to overcome three climbs. During their first stop, Heiko, who is excellent at mental arithmetic, says: "If you multiply the three distances from Passau to the peak of each climb, you get a multiple of 2261." After thinking about that for a while, Eva responds: "You also get a multiple of 2261 if you multiply the distances measured from Linz instead of Passau." After riding $80 \mathrm{~km}$ from the start they make a second stop and Heiko remarks: "Now there is only one climb ahead before we arrive in Linz." Assuming that all the distances are road distances in kilometres and that they are integers, find the distances from Passau to the peak of each climb in kilometres. Result. $68,76,91$ Solution. Let $A, B$, and $C$ be the three distances of the peaks from Passau measured in $\mathrm{km}$. These distances have to satisfy $2261 \mid A B C$ and $2261 \mid(110-A)(110-B)(110-C)$. Due to $2261=7 \cdot 323=7 \cdot 17 \cdot 19$ and $7 \cdot 17=119>110$ none of the distances can obtain more than one prime factor of 2261 . W.l.o.g. $7|A, 17| B$, and $19 \mid C$. Since the same considerations apply to the distances $110-A, 110-B$ and $110-C$, we get the two possibilities $7 \mid(110-B)$ and $7 \mid(110-C)$ due to $7 \nmid(110-A)$. In the case $7 \mid(110-B)$ we get $19 \mid(110-A)$ from $19 \nmid(110-C)$, and finally $17 \mid(110-C)$. In the case $7 \mid(110-C)$ we get $17 \mid(110-A)$ and $19 \mid(110-B)$ in a similar way. Since $\operatorname{GCD}(7,19)=1$, the only way to decompose 110 as $a \cdot 7+b \cdot 19$ with $a, b$ non-negative integers is $110=13 \cdot 7+1 \cdot 19$ (all the decompositions are of the form $110=(13+19 k) \cdot 7+(1-7 k) \cdot 19$ for $k \in \mathbb{Z}$ and the coefficients are non-negative only for $k=0$ ). Similarly, we get the decompositions $110=4 \cdot 17+6 \cdot 7$ and $110=4 \cdot 19+2 \cdot 17$. This leads to the two solutions $$ A=13 \cdot 7=91, \quad B=4 \cdot 17=68, \quad C=4 \cdot 19=76 $$ and $$ A=6 \cdot 7=42, \quad B=2 \cdot 17=34, \quad C=19 $$ Heiko's remark during the second stop indicates that the third peak is at least $80 \mathrm{~km}$ away from Passau. As a consequence, the sought distances are 68, 76, and 91 . Problem 42. Let $A B C$ be a right-angled triangle with right angle at $C$ such that $A C=4-\sqrt{3}$ and $B C=\sqrt{3}$. Furthermore, let $D$ and $E$ be points such that $A B D E$ is a square not containing point $C$ in its interior, and let $J$ be a point on $D E$ such that $\angle A C J=45^{\circ}$. Finally, let $K$ be a point on $C J$ such that $A K \| B C$. What is the area of the triangle $J K E$ ? Result. $3 \sqrt{3} / 8$ Solution. Firstly, note that $\angle E K A=90^{\circ}$; in fact, triangles $A E K$ and $A B C$ are congruent since $A K=A C, A E=A B$, and $\angle E A K=\angle B A C$. Further, the centre $S$ of square $A B D E$ lies on the circumcircle of triangle $A B C$ because $A S B$ and $A C B$ are right angles. Since $A S=B S$, the corresponding inscribed angles $A C S$ and $B C S$ are equal as well. Therefore $S$ lies on the angle bisector $C J$. Let us reflect the triangle $J K E$ across $S$; then $E$ is mapped to $B$, $J$ is mapped to $H$, which is the intersection of $A B$ and $C J$, and $K$ is mapped to $I$, which lies on $C J$ and satisfies $\angle I B C=90^{\circ}$. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-12.jpg?height=565&width=552&top_left_y=1916&top_left_x=752) Now $I B C$ is an isosceles right-angled triangle with right angle at $B$, so its area is $(\sqrt{3})^{2} / 2=3 / 2$. Denoting by square brackets the area of triangle, we have $$ \frac{[I B C]}{[I B H]}=\frac{I C}{I H}=\frac{I H+H C}{I H}=1+\frac{H C}{I H} $$ Furthermore, triangles $A C H$ and $B I H$ are clearly similar, the coefficient of similarity being $$ \frac{H C}{I H}=\frac{A C}{I B}=\frac{A C}{B C} $$ We conclude that $$ [J K E]=[I B H]=[I B C] \cdot \frac{B C}{A C+B C}=\frac{3}{2} \cdot \frac{\sqrt{3}}{4}=\frac{3 \sqrt{3}}{8} $$ Problem 43. Two prisoners are standing in front of two boxes. They know that one box contains two white marbles and one black marble and the other box contains one white marble and two black marbles; however, they do not know which box is which. Each prisoner is to choose a box and randomly draw a marble from it (without replacement). If they draw a white marble, they are free, otherwise they are executed. If the second prisoner witnesses the first one's choice and its outcome and proceeds in the most logical way, what is the probability of his survival before the first marble is drawn? We assume that the first prisoner picks the box randomly. Result. $5 / 9$ Solution. Let us denote $c$ the colour the first prisoner drew and $o$ the other colour. Then the probability that he drew from box with $c, c, o$ is $2 / 3$ and the probability that he drew from the box with $c, o, o$ is $1 / 3$. If the second prisoner chooses the same box as the first one, he will draw colour $c$ with probability $$ \frac{2}{3} \cdot \frac{1}{2}+\frac{1}{3} \cdot 0=\frac{1}{3} $$ and thus colour $o$ with probability $$ 1-\frac{1}{3}=\frac{2}{3} $$ On the other hand if he chooses the other box, he will draw colour $c$ with probability $$ \frac{2}{3} \cdot \frac{1}{3}+\frac{1}{3} \cdot \frac{2}{3}=\frac{4}{9} $$ and colour $o$ with probability $$ 1-\frac{4}{9}=\frac{5}{9} $$ In case $c$ is white, the second prisoner will survive if he draws $c$. Since $\frac{4}{9}>\frac{1}{3}$, it is better for him to choose the other box, and he will survive with probability $\frac{4}{9}$. In case $c$ is black, the second prisoner will survive if he draws $o$. Since $\frac{2}{3}>\frac{5}{9}$, it is better for him to choose the same box, and he will survive with probability $\frac{2}{3}$. Clearly $c$ is white with probability $\frac{1}{2}$ and black with probability $\frac{1}{2}$, hence the second prisoner will survive with probability $$ \frac{4}{9} \cdot \frac{1}{2}+\frac{2}{3} \cdot \frac{1}{2}=\frac{5}{9} $$ Problem 44. What is the smallest positive integer $n$ such that among any $n$ (not necessarily distinct) real numbers from the interval $[1,2019]$, there are three numbers representing lengths of sides of a nondegenerate triangle? Result. 18 Solution. For $n<18$ take the first $n$ elements of the Fibonacci sequence given by $a_{1}=a_{2}=1, a_{k+2}=a_{k+1}+a_{k}$ : $$ 1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597 $$ Clearly the greatest number of any triple formed from these numbers is greater or equal to the sum of the two others and hence no such triple can form a nondegenerate triangle. For $n=18$, let $x_{1} \leq \cdots \leq x_{18}$ be the chosen numbers. If no three of them form a nondegenerate triangle, we get $$ x_{1}, x_{2} \geq 1, \quad x_{3} \geq x_{1}+x_{2} \geq 2, \quad x_{4} \geq x_{3}+x_{2} \geq 2+1=3, \quad \ldots $$ obtaining in each step a term of the mentioned Fibonacci sequence and thus we end with $x_{18} \geq 987+1597>2019$, which is impossible. The desired number is therefore $n=18$. Problem 45. Let $\sigma(k)$ denote the number of all (positive) divisors of a positive integer $k$. Find the smallest positive integer $n$ such that the highest common factor of $\sigma(n)$ and $\sigma\left(n^{3}\right)$ is not a power of two (including 1 ). Result. $\quad 432=2^{4} \cdot 3^{3}$ Solution. Recall that if $$ n=p_{1}^{\alpha_{1}} \cdot p_{2}^{\alpha_{2}} \cdots p_{t}^{\alpha_{t}} $$ is the prime factorization of $n$, then $$ \sigma(n)=\left(\alpha_{1}+1\right)\left(\alpha_{2}+1\right) \cdots\left(\alpha_{t}+1\right) $$ The condition that the highest common factor is not a power of two can be equivalently restated that there is an odd prime number $q$ dividing both $\sigma(n)$ and $\sigma\left(n^{3}\right)$. Since $$ \sigma\left(n^{3}\right)=\left(3 \alpha_{1}+1\right)\left(3 \alpha_{2}+1\right) \cdots\left(3 \alpha_{t}+1\right) $$ this number is never divisible by 3 , therefore the smallest possible value of $q$ is 5 . Further note that $q$ cannot divide $\alpha_{i}+1$ and $3 \alpha_{i}+1$ at the same time, for otherwise it would have to divide $$ 3\left(\alpha_{i}+1\right)-\left(3 \alpha_{i}+1\right)=2 $$ Therefore there are distinct $i, j \in\{1, \ldots, t\}$ such that $q \mid \alpha_{i}+1$ and $q \mid 3 \alpha_{j}+1$. Since we are looking for the smallest number, we may assume that $t=2, i=1$, and $j=2$. If $q=5$, the smallest possible values for $\alpha_{1}, \alpha_{2}$ are $\alpha_{1}=4, \alpha_{2}=3$, and taking the smallest possible primes, i.e. $p_{1}=2, p_{2}=3$, we obtain $n=2^{4} \cdot 3^{3}=432$. If $q \geq 7$, then $\alpha_{1} \geq 6$ and $\alpha_{2} \geq 2$, yielding $$ n \geq 2^{6} \cdot 3^{2}=576>432 $$ showing that 432 is indeed the smallest possible value of $n$. Problem 46. Let $A B C$ be a right-angled triangle with $\angle A C B=90^{\circ}, A C=15, B C=20$. Let $D$ be the point on the line $A B$ such that $C D \perp A B$. The circle $t$ inscribed in the triangle $A C D$ touches the line $C D$ at $T$. Another circle $c$ also touches the line $C D$ at $T$, and it touches the line segment $B C$. Denote the two intersections of the circle $c$ with the line $A B$ by $X$ and $Y$. What is the length of $X Y$ ? Result. $3 \sqrt{5}$ Solution. Using the formulas for the segments of the hypotenuse, we compute $$ A D=\frac{A C^{2}}{A B}=9, \quad B D=\frac{B C^{2}}{A B}=16, \quad C D=\sqrt{A D \cdot B D}=12 $$ The radius of circle $t$ (which is equal to $D T$ ) can be computed using the well-known formula by dividing the area of the triangle $A C D$ by the half of its perimeter: We get that $D T=54 /(36 / 2)=3$. Let the circle inscribed in the triangle $B C D$, denoted by $\omega$, touch the line $C D$ at $S$. Similarly, its radius is equal to $D S=4$. The homothety with the center at $C$ and ratio $C T / C S=9 / 8$ sends the circle $\omega$ to the circle $c$. Therefore, the radius of the circle $c$ is $4 \cdot 9 / 8=9 / 2$. Let $M$ be the midpoint of the segment $X Y$ and $O$ the center of the circle $c$. We know that $X O=9 / 2$ and $O M=D T=3$. Henceforth, using the Pythagorean theorem we conclude that $$ X Y=2 \cdot X M=2 \sqrt{\frac{9^{2}}{2^{2}}-3^{2}}=6 \sqrt{\frac{9}{4}-1}=3 \sqrt{5} $$ ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-14.jpg?height=677&width=948&top_left_y=1957&top_left_x=560) Problem 47. Every square of a $6 \times 7$ chessboard is coloured white, green, red, or blue. We call such a colouring attractive if the four squares of any $2 \times 2$ square have distinct colours. How many attractive colourings are there? Result. 1128 Solution. Let us make two observation. Firstly, since the colours of any two consecutive squares are clearly different then if there are more than two colours present in a row then there are three consecutive cells coloured by three different colours in that row. Secondly, such a triple completely determines the colouring of the respective three columns, e.g. triple $1-2-3$ forces the vertically neighbouring triples to be $3-4-1$ and these two triples have to alternately fill the respective three columns making them all contain just two colours. The same holds for columns instead of rows as well. Hence there cannot be more than two colours used in some row and more than two colours used in some column at the same time. Assume now that the table has 6 rows and 7 columns. Let us compute the number of colourings using only two colours in every row: We choose the two colours for the first row (then the pair of colours for any other row is also determined) and then choose the starting colour in each of the 6 rows. This yields $\binom{4}{2} \cdot 2^{6}=6 \cdot 2^{6}$ colourings. Analogously the number of colourings using only two colours in every column is $6 \cdot 2^{7}$. Finally we have to subtract the number of colourings using only two colours in every row and every column. Since such a colouring is determined by the upper left $2 \times 2$ square there are $4 \cdot 3 \cdot 2=24$ of them. The result is $6 \cdot 2^{6}+6 \cdot 2^{7}-24=1128$. Problem 48. One hundred children stand in a row. The first child has 4 grams of chocolate, the second child has 8 grams of chocolate and so on until the 100th child has 400 grams of chocolate. The first child gives one third of their chocolate to the second child (so the second child now has $\frac{28}{3}$ grams of chocolate). The second child gives one third of their chocolate to the third child and so on until the 99th child gives one third of their chocolate to the 100th child. How many grams of chocolate will the 100th child have in the end? Result. $\quad 597+3^{-99}$ Solution. All weights are in grams. After the first step, the second child has $8+4 / 3$. In the second step, it gives one third of their chocolate to the third child which has $12+8 / 3+4 / 3^{2}$ then. After the third step, the fourth child has $16+12 / 3+8 / 3^{2}+4 / 3^{3}$. It is easy to observe that in the end, the 100 th child has $$ 4\left(100+\frac{99}{3^{1}}+\frac{98}{3^{2}}+\frac{97}{3^{3}}+\cdots+\frac{2}{3^{98}}+\frac{1}{3^{99}}\right) $$ Let us denote $$ S=100+\frac{99}{3^{1}}+\frac{98}{3^{2}}+\frac{97}{3^{3}}+\cdots+\frac{2}{3^{98}}+\frac{1}{3^{99}} $$ Then we have $$ \begin{aligned} S= & 1+\frac{1}{3}+\frac{1}{3^{2}}+\cdots+\frac{1}{3^{98}}+\frac{1}{3^{99}}+ \\ + & 1+\frac{1}{3}+\frac{1}{3^{2}}+\cdots+\frac{1}{3^{98}}+ \\ & \vdots \\ + & 1+\frac{1}{3}+ \\ & +1 \end{aligned} $$ Using the sum of geometric series, $$ 1+\frac{1}{3}+\frac{1}{3^{2}}+\cdots+\frac{1}{3^{n}}=\frac{1-\frac{1}{3^{n+1}}}{1-\frac{1}{3}}=\frac{3}{2}\left(1-\frac{1}{3^{n+1}}\right) $$ we get $$ \begin{aligned} S & =\frac{3}{2}\left(100-\left(\frac{1}{3^{100}}+\frac{1}{3^{99}}+\cdots+\frac{1}{3}\right)\right) \\ & =\frac{3}{2}\left(100-\frac{1}{3}\left(\frac{1}{3^{99}}+\frac{1}{3^{98}}+\cdots+1\right)\right) \\ & =\frac{3}{2}\left(100-\frac{1}{2}\left(1-\frac{1}{3^{100}}\right)\right) \end{aligned} $$ Finally we obtain $$ 4 S=4 \cdot \frac{3}{2}\left(100-\frac{1}{2}\left(1-\frac{1}{3^{100}}\right)\right)=600-3+\frac{1}{3^{99}}=597+3^{-99} $$ Problem 49. Find all integers $n \geq 3$ for which $$ \frac{(n-1)^{n-1}-n^{2}+2019 \cdot(n-1)}{(n-2)^{2}} $$ is an integer. Result. $3,4,5,6,8,14$ Solution. We would like $n$ to satisfy $(n-2)^{2} \mid(n-1)^{n-1}-n^{2}+2019 \cdot(n-1)$. This is not influenced by adding $(n-2)^{2}$ to the right-hand side and it allows us to get rid of the term $n^{2}$, since $n^{2}-4 n+4-n^{2}=-4(n-1)$. We obtain an equivalent condition $$ (n-2)^{2} \mid(n-1)^{n-1}+2015 \cdot(n-1) $$ Since $n-1$ and $n-2$ are coprime, we can divide the right-hand side by $n-1$. Substitute $t=n-2$. Then $t^{2} \mid(t+1)^{t}+2015$. Finally, we use the binomial expansion to get $$ t^{2} \left\lvert\, t^{t}+\binom{t}{t-1} t^{t-1}+\cdots+\binom{t}{2} t^{2}+\binom{t}{1} t+1+2015\right. $$ so all what is needed is $t^{2} \mid 2016$. The prime factorization of 2016 is $2^{5} \cdot 3^{2} \cdot 7$, so the values $1,2,3,4,6,12$ are the only possible (and satisfying) for $t$. Substituting back into $n=t+2$ leads to the result 3, 4, 5, 6, 8, 14 . Problem 50. Let $A B C$ be an equilateral triangle with each vertex on one of three concentric circles with radii 3, 4, and 5 , respectively. Find all possible side lengths of the triangle. Result. $\sqrt{25-12 \sqrt{3}}, \sqrt{25+12 \sqrt{3}}$ Solution. Let $A$ be on the circle with radius $3, B$ on the one with radius $4, C$ on the circle with radius 5 , and let $S$ be the centre of the circles. There are two cases to consider. First assume that $S$ lies outside triangle $A B C$. Rotating $C$ and $S$ by $60^{\circ}$ around $B$ we obtain points $C^{\prime}=A$ and $S^{\prime}$. Then triangle $S B S^{\prime}$ is equilateral with side length 4 , and $S^{\prime} C^{\prime}=S C=5$. Triangle $S S^{\prime} C^{\prime}$ has side lengths 3,4 , 5 , hence $\angle S^{\prime} S C^{\prime}=90^{\circ}$. Hence $\angle B S A=\angle S^{\prime} S C^{\prime}-\angle S^{\prime} S B=30^{\circ}$. Using the law of cosines in the triangle $B S A$ we obtain $A B=\sqrt{25-12 \sqrt{3}}$. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-16.jpg?height=571&width=594&top_left_y=1296&top_left_x=731) If $S$ lies inside triangle $A B C$, we can rotate $A$ and $S$ by $60^{\circ}$ around $B$ to get points $A^{\prime}=C$ and $S^{\prime}$. Similarly, triangle $S S^{\prime} A^{\prime}$ is right with $\angle S S^{\prime} A^{\prime}=90^{\circ}$. Hence $\angle B S A=\angle B S^{\prime} A^{\prime}=\angle S S^{\prime} A^{\prime}+\angle S S^{\prime} B=150^{\circ}$. Using the law of cosines in triangle $B S A$ we obtain the second solution $A B=\sqrt{25+12 \sqrt{3}}$. ![](https://cdn.mathpix.com/cropped/2024_06_04_35f206d4039433bd6c7cg-16.jpg?height=597&width=580&top_left_y=2026&top_left_x=744) Problem 51. Seven people are sitting (equally-spaced) around a round table, on which seven arrows are drawn so that exactly one starts at each seat and exactly one points to each seat (the starting and the ending seat do not have to be distinct). Every minute, people change their seats, exchanging their current seat for the one where the arrow from their seat points, and the table is rotated by one seat clockwise. What is the maximal number of minutes that will take all the people to get back to their initial seats simultaneously and for the first time? Result. 84 Solution. Note that every 7 rounds people permute their seats around the table, but the table gets back to its initial position. Therefore, we see that looking at every 7 th minute people will just change their places as in normal permutation. The minimal number of times a permutation on seven elements can be applied before elements return to their initial positions (i.e. the order of the permutation) can be at most 12: This is obtained for a permutation which permutes elements like $$ 1 \rightarrow 2 \rightarrow 3 \rightarrow 1 ; \quad 4 \rightarrow 5 \rightarrow 6 \rightarrow 7 \rightarrow 4 $$ In general, the order is the least common multiple of lengths of the cycles in the decomposition of the form above; it is easy to see that 12 is indeed the maximal order. This gives an upper bound of $7 \cdot 12=84$ minutes required to get people back to their initial seats. If the arrows are drawn on the table so that initially only people 1 and 4 exchange their seats, then after seven minutes, the people are permuted according to the permutation $$ 1 \rightarrow 2 \rightarrow 3 \rightarrow 1 ; \quad 4 \rightarrow 7 \rightarrow 6 \rightarrow 5 \rightarrow 4 $$ so if we consider only every 7 th minute, then the procedure indeed takes 84 minutes. It remains to observe that the people cannot get to their initial seats in the meantime: Every 7 th minute the seats 1, 2, and 3 are occupied by their (possibly permuted) original occupants, but in the subsequent six minutes, at least one of these people sits away from these three seats. Problem 52. Let $a_{1}, a_{2}, a_{3}, \ldots$ be a sequence of positive real numbers. Starting from the second term $a_{2}$ each number is half the sum of the arithmetic and geometric mean of the two neighbour numbers. Find $a_{333}$ if it is known that $a_{1}=\frac{2}{7}$ and $a_{11}=\frac{7}{2}$. Note: The geometric mean of positive reals $x$ and $y$ is defined as $\sqrt{x y}$. Result. 2016 Solution. The condition translates into $$ a_{k}=\frac{\frac{a_{k-1}+a_{k+1}}{2}+\sqrt{a_{k-1} \cdot a_{k+1}}}{2}=\frac{\left(\sqrt{a_{k-1}}+\sqrt{a_{k+1}}\right)^{2}}{4} $$ for every $k \geq 2$. Since the terms of the sequence are positive, this can be rewritten as $$ \sqrt{a_{k}}=\frac{\sqrt{a_{k-1}}+\sqrt{a_{k+1}}}{2} $$ This implies that the sequence $b_{1}, b_{2}, \ldots$ where $b_{k}=\sqrt{a_{k}}$ is arithmetic; let $d$ be its common difference. We know that $b_{1}=\sqrt{2 / 7}$ and $b_{11}=\sqrt{7 / 2}$, so $$ d=\frac{\sqrt{7 / 2}-\sqrt{2 / 7}}{10}=\frac{1}{2 \sqrt{14}} $$ We infer that $$ b_{333}=b_{1}+332 \cdot d=\sqrt{\frac{2}{7}}+\frac{332}{2 \sqrt{14}}=\frac{4+332}{2 \sqrt{14}}=12 \sqrt{14} $$ It follows $a_{333}=b_{333}^{2}=2016$. Problem 53. Adam has a rectangle with perimeter 444 and sides positive integers $a, b$ satisfying $a>b$. He tried to cover it by squares with side length $a-b$ putting the first square into the upper left corner and then following the pattern of a square grid with axes parallel to the sides of the rectangle and the origin being the top left corner of the rectangle. At some point (after putting at least one square) he had to stop because no more squares lying completely in the rectangle could be added. Area of the uncovered part of the rectangle is 1296. Summing over all such rectangles, find the sum of all possible side lengths of the square used for filling the rectangle. Result. 166 Solution. We have $a \equiv b \equiv r(\bmod a-b)$ where $0 \leq r \leq a-b-1$. Thus the area of the uncovered part is $r a+r b-r^{2}=-r^{2}+222 r=1296$ which is equivalent to $(r-6)(r-216)=0$. Obviously $a>r$ and $b>r$ so we get $r=6$. If we remove the uncovered area and set $x=a-r, y=b-r$, we obtain an $x \times y$ rectangle covered by $(x-y) \times(x-y)$ squares (since $x-y=a-b$ ) and $x+y=a+b-2 r=210=2 \cdot 3 \cdot 5 \cdot 7$. Now $x-y$ has to be a divisor of both $x$ and $y$, and so of $x+y$, too. Let us pick a divisor $d \mid 210$ and set $x-y=d$. Then using $x+y=210$ we solve for $x$ and $y$ : $$ x=\frac{210+d}{2}, \quad y=\frac{210-d}{2} $$ Since the solutions must be positive integers (there is at least one square of side length $a-b=x-y$, therefore positive) and as $x-y>6$ (because of the maximality of the almost-cover), one can see that $d$ yields a solution if only if it is an even divisor of 210 and satisfies $6