![](https://cdn.mathpix.com/cropped/2024_06_05_6ac7a1c747cc0a962278g-01.jpg?height=331&width=1630&top_left_y=283&top_left_x=247) # Problems and Solutions Problem 1. A grasshopper is jumping along the number line. Initially it is situated at zero. In $k$-th step, the length of his jump is $k$. a) If the jump length is even, then it jumps to the left, otherwise it jumps to the right (for example, firstly it jumps one step to the right, then two steps to the left, then three steps to the right, then four steps to the left...). Will it visit on every integer at least once? b) If the jump length is divisible by three, then it jumps to the left, otherwise it jumps to the right (for example, firstly it jumps one step to the right, then two steps to the right, then three steps to the left, then four steps to the right...). Will it visit every integer at least once? (Matko Ljulj) Solution. Let us denote with $x_{k}$ position in the $k$-th step. a) For even $n=2 k$ we have $$ \begin{gathered} x_{2 k}=1-2+3+\ldots+(2 k-1)-2 k= \\ (1+2+3+\ldots+2 k)-2(2+4+6+\ldots+2 k)= \\ \frac{3 k(3 k+1)}{2}-4 \frac{k(k+1)}{2}=-k \end{gathered} $$ For odd $n=2 k+1$ we have $$ x_{2 k+1}=x_{2 k}+(2 k+1)=k+1 $$ Hence we see that all integers occur exactly once in sequence $\left(x_{k}\right)_{k}$ : positive integer $n$ occur in $(2 n-1)$-th place, negative integer $-n$ (for some $n>0$ ) occurs in (2n)-th place. b) For $n=3 k$ we have $$ \begin{gathered} x_{3 k}=1+2-3+\ldots+(3 k-2)+(3 k-1)-3 k= \\ (1+2+3+\ldots+3 k)-2(3+6+9+\ldots+3 k)= \\ \frac{2 k(2 k+1)}{2}-6 \frac{k(k+1)}{2}=\frac{3 k(k-1)}{2} . \end{gathered} $$ For $k=0,1$ we have that $x_{3 k}=0$. For all other $k$ we have $x_{3 k}>0$ since it is a product of positive numbers. For $n=3 k+1, n=3 k+2$ we have $$ x_{3 k+1}=x_{3 k}+(3 k+1)>0, x_{3 k+2}=x_{3 k}+(3 k+1)+(3 k+2)>0 $$ Thus, all $x_{k}$ are non-negative, and grasshopper will not reach any negative integer. Problem 2. Two circles $C_{1}$ and $C_{2}$ intersect at points $A$ and $B$. Let $P, Q$ be points on circles $C_{1}, C_{2}$ respectively, such that $|A P|=|A Q|$. The segment $\overline{P Q}$ intersects circles $C_{1}$ and $C_{2}$ in points $M, N$ respectively. Let $C$ be the center of the $\operatorname{arc} B P$ of $C_{1}$ which does not contain point $A$ and let $D$ be the center of arc $B Q$ of $C_{2}$ which does not contain point $A$. Let $E$ be the intersection of $C M$ and $D N$. Prove that $A E$ is perpendicular to $C D$. (Steve Dinh) First Solution. We present the following sketch: ![](https://cdn.mathpix.com/cropped/2024_06_05_6ac7a1c747cc0a962278g-02.jpg?height=1197&width=1376&top_left_y=538&top_left_x=363) As $A P=A Q$ the triangle $A P Q$ is isosceles, which implies $\angle A P Q=\angle A Q P$. Angles over the same chord $A M$ of $C_{1}$ imply $\angle A C M=\angle A P M$. As $C$ is the midpoint of the chord $B P$, we have $\angle P A C=\angle C A B$, analogously $\angle D A Q=\angle B A D$. This implies that $2 \angle C A D=\angle P A Q$. Combining the results above we get as sum of the angles in triangle $A P Q$ that $2 \angle C A D+2 \angle A P Q=180^{\circ}$ which in turn implies $\angle A C N+\angle D A C=90^{\circ}$ and in particular $A D \perp C M$. Analogously we conclude $D N \perp A C$. We now conclude that this implies $E$ is the orthocenter of the triangle $A C D$ implying $A E \perp C D$ completing the proof. Second Solution. As $A P=A Q$ the triangle $A P Q$ is isosceles, which implies $\angle A P Q=\angle A Q P$. Angles over the same chord $A M$ of $C_{1}$ imply $\angle M B A=\angle A P M$, analogouslythisimplies $\angle A B M=\angle A P Q$ Combining the above we conclude $\angle M B A=\angle N B A$ so in particular $A B$ is angle bisector of $\angle M B N$. As $C$ is the midpoint of the arc $B P$ we have $\angle P M C=\angle B M C$. We note this implies $E$ lies on 2 angle bisectors of the triangle $B N M$, so is its incenter. This implies that $A, E, B$ are collinear. We are now able to remove $M, N, E$ from the picture and it is enough to show $C D \perp A B$. Let $\alpha=\angle C A B$ and $\beta=\angle B A D$. Then this is equivalent to $A C \cdot \cos \alpha=A D \cdot \cos \beta$. Ptolomey's theorem for cyclic quadrilateral $A P C B$ implies that $$ A C=\frac{B C \cdot A P+A B \cdot C P}{B P}=\frac{B C(A P+A B)}{2 \cos \alpha \cdot B C} $$ After simplifying and taking an analogous equality for $C_{2}$ and cyclic quadrilateral $A B D C$ gives $$ A C \cos \alpha=\frac{A P+A B}{2}=\frac{A Q+A B}{2}=A D \cos \beta $$ completing the proof. Remark: Note that we are using only the very basic trigonometry, namely for a right angled triangle $(B P=2 \cos \alpha \cdot B C$ follows by taking the midpoint of $B P$ and considering 2 right-angled triangles this creates.) This can be alltogether avoided using similar triangles. Problem 3. Prove that for all positive integers $n$ there exist $n$ distinct, positive rational numbers with sum of their squares equal to $n$. (Daniyar Aubekerov) First Solution. We will prove this claim by induction. For basis, we find solutions for $n=1,2,3$ : $$ 1^{2}=1,\left(\frac{1}{5}\right)^{2}+\left(\frac{7}{5}\right)^{2}=2,1,1^{2}+\left(\frac{1}{5}\right)^{2}+\left(\frac{7}{5}\right)^{2}=3 $$ Now, let us assume that for all integers less than $n$ the claim is true. Let us prove the claim for $n$. If $n=4 k$ for some integer $k$, then, by induction hypothesis, there exist rationals $x_{1}, \ldots, x_{k}$ such that $$ \begin{gathered} x_{1}^{2}+\ldots+x_{k}^{2}=k \\ \Longrightarrow\left(2 x_{1}\right)^{2}+\ldots+\left(2 x_{k}\right)^{2}=4 k \end{gathered} $$ Let $a$ be the smallest rational number from the left hand side of the above equation. We will replace this number with numbers $$ \frac{3}{5} a, \frac{4}{5} a $$ By this, we get one more summand on the left hand side, but the equality still holds. Since $a$ was the smallest and $\frac{3}{5} a<\frac{4}{5} aa$. Then we can take $x=\frac{b-a}{c}, y=\frac{b+a}{c}$. Now, we take any number $n$. If it is even, then we will take $n / 2$ pairs of rationals with sum of squares equal 2 . If it is odd, we will take $(n-1) / 2$ of such pairs, and one number 1 . To be sure that all numbers are distinct, we can take primitive Pythagorean triples such that all of them have unique third member $c$ of the triple. It is clear that they are nonzero. Let us now prove that all rationals are distinct. Firstly, if $\frac{b-a}{c}=\frac{b+a}{c}$, that implies $a=0$, which is impossible for a member of Pythagorean triple. Let us now assume that two different primitive Pythagorean triples $(a, b, c)$ and $\left(a^{\prime}, b^{\prime}, c^{\prime}\right)$ (with $\left.c \neq c^{\prime}\right)$ generate at least two same rational numbers. Since sum of squares of those rationals is the same, another pair of rationals must be equal as well. Thus we have to have either $$ \begin{aligned} \frac{b-a}{c} & =\frac{b^{\prime}-a^{\prime}}{c^{\prime}} \text { and } \frac{b+a}{c}=\frac{b^{\prime}+a^{\prime}}{c^{\prime}} \Longrightarrow \frac{b-a}{b^{\prime}-a^{\prime}}=\frac{b+a}{b^{\prime}+a^{\prime}}=\frac{c}{c^{\prime}}=\lambda \in \mathbb{Q} \text {, or } \\ \frac{b-a}{c} & =\frac{b^{\prime}+a^{\prime}}{c^{\prime}} \text { and } \frac{b+a}{c}=\frac{b^{\prime}-a^{\prime}}{c^{\prime}} \Longrightarrow \frac{b-a}{b^{\prime}+a^{\prime}}=\frac{b+a}{b^{\prime}-a^{\prime}}=\frac{c}{c^{\prime}}=\lambda \in \mathbb{Q} \end{aligned} $$ In both cases we have $a^{2}+b^{2}=c^{2}=\lambda^{2}\left(c^{\prime}\right)^{2}=\lambda^{2}\left(\left(a^{\prime}\right)^{2}+\left(b^{\prime}\right)^{2}\right)$ and $b^{2}-a^{2}=\lambda^{2}\left(\left(b^{\prime}\right)^{2}-\left(a^{\prime}\right)^{2}\right)$. Hence $c^{2}=\lambda^{2}\left(c^{\prime}\right)^{2}$, $a^{2}=\lambda^{2}\left(a^{\prime}\right)^{2}, b^{2}=\lambda^{2}\left(b^{\prime}\right)^{2}$. But then, if $\lambda=p / q$, then either $p \mid a, b, c$ or $q \mid a^{\prime}, b^{\prime}, c^{\prime}$ or $\lambda=1$, which contradicts the fact that our triples are primitive or that $c^{\prime} \neq c$. All in all, we get contradiction, thus all rationals are distinct. Problem 4. We will call a pair of positive integers $(n, k)$ with $k>1$ a lovely couple if there exists a table $n \times n$ consisting of ones and zeros with following properties: - In every row there are exactly $k$ ones. - For each two rows there is exactly one column such that on both intersections of that column with the mentioned rows, number one is written. Solve the following subproblems: a) Let $d \neq 1$ be a divisor of $n$. Determine all remainders that $d$ can give when divided by 6 . b) Prove that there exist infinitely many lovely couples. (Miroslav Marinov, Daniel Atanasov) Solution. Let us firstly prove several lemmas. Before that, notice that changing two columns or two rows of the table will not change the properties of our table. Lemma 1: In every column there are exactly $k$ ones. Proof: It is impossible that one column contains $n$ ones. If we suppose the contrary, then on the rest of the table, consisting of $n-1$ columns, we would have to have $n(k-1) \geqslant n$ ones such that no two ones are in the same column, which is impossible. Thus, every column contains at least one zero. Let us now suppose that there exists a column with more than $k$ ones. Without loss of generality, let this column be the first column, where ones are written in the first $k+1$ rows, and at least one digit zero, which this column must contain, is written in last row. Again, without loss of generality, let the last row contain ones in the second, third, ..., $(k+1)$-th column. On the intersection of 2 nd column and first $k+1$ rows there can be at most one digit one, because, in the contrary, some two of the first $k+1$ rows would have first and second column in common. Same argument holds for intersection of the 3rd column and first $k+1$ rows, . ., ( $k+1)$-th column and first $k+1$ rows. Hence, on the intersection of first $k+1$ rows, and 2 nd, $3 \mathrm{rd}, \ldots,(k+1)$-th row there are at most $k$ ones. However, for the last row and for every row among the first $k+1$ rows, there must exist exactly one column such that both rows contain digit one in that column. This is only possible if those ones are on the intersection of first $k+1$ rows, and 2 nd, 3 rd, ..., $(k+1)$-th row. Thus, in the mentioned zone there must be exactly $k+1$ ones, which leads to contradiction. Thus we conclude that every column contains at most $k$ digits one. Since the whole table consists of $n k$ digits one, we have that every column contains exactly $k$ digits one. Lemma 2: We have $n=k^{2}-k+1$. Proof: Let us count the pairs of ones in the same column. On the one hand, since there are $n$ columns, every column contains $k$ ones, there are $$ n\binom{k}{2} $$ pairs of ones in the same column. On the other hand, every pair of ones from the same column determine exactly one pair of rows, since each pair of rows has exactly one column in common. Thus, the number of pairs of ones from the same column is also equal to $$ \binom{n}{2} $$ Identifying mentioned two expressions we get $n=k^{2}-k+1$. Now, we will prove the problem. Solution of a) part: When varying $k$, we see that $n \equiv 1(\bmod 6)$ or $n \equiv 3(\bmod 6)$. Both options are possible, see examples for $k=2, k=3$ below. Let $q$ be a prime divisor of the number $n=k^{2}-k+1$. Since $n$ is odd, $q$ is odd as well, thus possible remainders modulo 6 are $1,3,5$. We will prove that remainder 5 is not possible. Let us suppose that $q=6 t+5$. Then, since $q \mid k^{3}+1=(k+1)\left(k^{2}-k+1\right)$ we have $k^{3} \equiv-1(\bmod q)$. On the other hand, we have $k^{q-1}=k^{6 t+4} \equiv 1(\bmod q)$. From those last two identities we get $k \equiv-1(\bmod q) \Longrightarrow n \equiv 3(\bmod q)$, i.e. $q \mid 3$, contradiction. Let $d$ be any divisor of the number $n$. From above, it is either 1 or a product of prime numbers of the form $6 t+1$ and 3. Anyhow, we have that remainder of $d$ when divided by six is either 1 or 3 . Solution of $\mathbf{b}$ ) part: We will prove that for any prime $p$, the pair of numbers $\left(p^{2}+p+1, p+1\right)$ is a lovely couple. Let us denote with $A(i, j)$ the number in the table on the intersection of the $i$-th row and $j$-th column, with the convention that we count rows and columns from the zero in this part of the solution. We define our table in the following way (example for $p=5$ is at the end) Rule a For $\alpha, \beta, \gamma \in\{0, \ldots, p-1\}$ we have $$ A(\alpha p+\beta, \gamma p+\delta)=1 \Longleftrightarrow \delta \equiv \alpha \gamma+\beta(\bmod p) $$ Rule $\mathbf{b} A\left(p^{2}+\alpha, \alpha p+\beta\right)=1$, for all $\alpha \in\{0, \ldots, p\}, \beta \in\{0, \ldots, p-1\}$, Rule c $A\left(\alpha p+\beta, p^{2}+\alpha\right)=1$, for all $\alpha \in\{0, \ldots, p\}, \beta \in\{0, \ldots, p-1\}$, Rule d $A\left(p^{2}+p, p^{2}+p\right)=1$, Rule e On all other unmentioned fields are zero. Let us prove that this table has all properties. Firstly, let us prove that in every row there is exactly $p+1$ ones. Case 1: In $i$-th row, $i