2022 Bosnia and Herzegovina IMO TST

1

Let $ABC$ be a triangle such that $AB=AC$ and $\angle BAC$ is obtuse. Point $O$ is the circumcenter of triangle $ABC$, and $M$ is the reflection of $A$ in $BC$. Let $D$ be an arbitrary point on line $BC$, such that $B$ is in between $D$ and $C$. Line $DM$ cuts the circumcircle of $ABC$ in $E,F$. Circumcircles of triangles $ADE$ and $ADF$ cut $BC$ in $P,Q$ respectively. Prove that $DA$ is tangent to the circumcircle of triangle $OPQ$.

2

Let $p$ be an odd prime number. Around a circular table, $p$ students sit. We give $p$ pieces of candy to those students in the following manner. The first candy we give to an arbitrary student. Then, going around clockwise, we skip two students and give the next student a piece of candy, then we skip 4 students and give another piece of candy to the next student... In general in the $k-$th turn we skip $2k$ students and give the next student a piece of candy. We do this until we don't give out all $p$ pieces of candy. $a)$ How many students won't get any pieces of candy? $b)$ How many pairs of neighboring students (those students who sit next to each other on the table) both got at least a piece of candy?

3

An infinite sequence is given by $x_1=2, x_2=7, x_{n+1} = 4x_n - x_{n-1}$ for all $n \geq 2$. Does there exist a perfect square in this sequence? RemarkDuring the test the initial value of $x_1$ was given as $1$, thus the problem was not graded

4

In each square of a $4 \times 4$ table a number $0$ or $1$ is written, such that the product of every two neighboring squares is $0$ (neighboring by side). $a)$ In how many ways is this possible to do if the middle $2\times 2$ is filled with $4$ zeros? $b)$ In general, in how many ways is this possible to do (regardless of the middle $2 \times 2$)?