# Solutions
## to Team Competition Problems
## Problem T-1
Determine the smallest and the greatest possible values of the expression
$$
\left(\frac{1}{a^{2}+1}+\frac{1}{b^{2}+1}+\frac{1}{c^{2}+1}\right)\left(\frac{a^{2}}{a^{2}+1}+\frac{b^{2}}{b^{2}+1}+\frac{c^{2}}{c^{2}+1}\right)
$$
provided $a, b$, and $c$ are non-negative real numbers satisfying $a b+b c+c a=1$.
(proposed by Walther Janous, Austria)
Answer. The smallest value is $\frac{27}{16}$ and the greatest is 2 .
Solution. Let us denote
$$
x=\frac{a^{2}}{a^{2}+1}+\frac{b^{2}}{b^{2}+1}+\frac{c^{2}}{c^{2}+1}, \quad y=\frac{2 a b c}{(a+b)(b+c)(c+a)}
$$
to simplify notation.
Denominators in $x$ can be manipulated using $a b+b c+c a=1$ as
$$
a^{2}+1=a^{2}+a b+b c+c a=(a+b)(a+c)
$$
and similarly for $b^{2}+1$ and $c^{2}+1$. This yields a relation between $x$ and $y$
$$
x=\frac{a^{2}(b+c)+b^{2}(c+a)+c^{2}(a+b)}{(a+b)(b+c)(c+a)}=1-\frac{2 a b c}{(a+b)(b+c)(c+a)}=1-y
$$
Using
$$
\frac{1}{a^{2}+1}=1-\frac{a^{2}}{a^{2}+1}
$$
and similar relations for $b$ and $c$ we have
$$
\left(\frac{1}{a^{2}+1}+\frac{1}{b^{2}+1}+\frac{1}{b^{2}+1}\right)\left(\frac{a^{2}}{a^{2}+1}+\frac{b^{2}}{b^{2}+1}+\frac{c^{2}}{c^{2}+1}\right)=(3-x) x
$$
Since $(3-x) x=(2+y)(1-y)=2-y-y^{2}$, we want to estimate $y$. Obviously $y \geq 0$ with equality e.g. for $(a, b, c)=(0,1,1)$. On the other hand $y \leq \frac{1}{4}$ as can be seen after multiplying three AM-GM inequalities
$$
a+b \geq 2 \sqrt{a b}, \quad b+c \geq 2 \sqrt{b c}, \quad c+a \geq 2 \sqrt{c a}
$$
The equality is reached for $a=b=c=\sqrt{\frac{1}{3}}$.
Finally we compute
$$
\frac{27}{16}=2-\frac{1}{4}-\frac{1}{16} \leq 2-y-y^{2} \leq 2
$$
Similar solution. Let us denote
$$
x=\frac{1}{a^{2}+1}+\frac{1}{b^{2}+1}+\frac{1}{c^{2}+1}
$$
Since
$$
\frac{a^{2}}{a^{2}+1}=1-\frac{1}{a^{2}+1}
$$
holds we have
$$
\left(\frac{1}{a^{2}+1}+\frac{1}{b^{2}+1}+\frac{1}{c^{2}+1}\right)\left(\frac{a^{2}}{a^{2}+1}+\frac{b^{2}}{b^{2}+1}+\frac{c^{2}}{c^{2}+1}\right)=x(3-x)=\frac{9}{4}-\left(x-\frac{3}{2}\right)^{2}
$$
To obtain the extrema it is sufficient to find the bounds of $x$.
The sum $a+b+c$ is non-negative because $a, b, c \geq 0$. If $a+b+c=0$ then $a=b=c=0$ what is in contradiction with $a b+b c+c a=1$, so $a+b+c>0$. Using $a b+b c+c a=1$ we obtain
$$
\frac{1}{a^{2}+1}=\frac{1}{a^{2}+a b+b c+c a}=\frac{1}{(a+b)(a+c)}
$$
and similarly for $1 /\left(b^{2}+1\right)$ and $1 /\left(c^{2}+1\right)$. This yields
$$
x=\frac{2(a+b+c)}{(a+b)(b+c)(c+a)}=\frac{2(a+b+c)}{(a+b+c)(a b+b c+c a)-a b c}=\frac{2}{1-\frac{a b c}{a+b+c}}
$$
and the problem is reduced to find bounds of $a b c /(a+b+c)$. We have obviously
$$
0 \leq \frac{a b c}{a+b+c}
$$
The equality holds there if one of $a, b, c$ is equal 0 and the product of remaining two is 1 . On the other hand using AM-GM inequality we have
$$
a+b+c=(a+b+c)(a b+b c+c a) \geq 3(a b c)^{\frac{1}{3}} \cdot 3(a b c)^{\frac{2}{3}}=9 a b c
$$
with equality in the case $a=b=c=\frac{\sqrt{3}}{3}$. So
$$
\frac{a b c}{a+b+c} \leq \frac{1}{9}
$$
These inequalities give us the bounds for $x$
$$
2 \leq x=\frac{2}{1-\frac{a b c}{a+b+c}} \leq \frac{9}{4}
$$
This follows
$$
\frac{27}{16} \leq \frac{9}{4}-\left(x-\frac{3}{2}\right)^{2} \leq 2
$$
The lower bound arises if one of $a, b, c$ is zero and product of the others is 1 , the upper bound arises if $a=b=c=\frac{\sqrt{3}}{3}$.
## Problem T-2
Let $\alpha$ be a real number. Determine all polynomials $P$ with real coefficients such that
$$
P(2 x+\alpha) \leq\left(x^{20}+x^{19}\right) P(x)
$$
holds for all real numbers $x$.
(proposed by Walther Janous, Austria)
Answer. For all $\alpha$ the only satisfying polynomial is $P(x) \equiv 0$.
Solution. Zero polynomial obviously satisfies the problem. Further, let us suppose that polynomial $P$ is non-zero. Let $n$ be its degree and $a_{n} \neq 0$ be its coefficient at $x^{n}$. Polynomial $\left(x^{20}+x^{19}\right) P(x)-P(2 x+\alpha)$ has degree $n+20$, coefficient $a_{n}$ at $x^{n+20}$ and it is non-negative for all real numbers $x$. It follows that $n+20$ (and $n$ too) is an even number and $a_{n}>0$.
For $x=-1$ and $x=0$ we obtain
$$
P(-2+\alpha) \leq 0 \quad \text { and } \quad P(\alpha) \leq 0
$$
So $P$ has real roots. Let $m$ be its minimal real root and $M$ the maximal real root. Since $a_{n}>0$ the values $P(x)$ are positive outside the interval $\langle m, M\rangle$. It yields $\{-2+\alpha, \alpha\} \subset\langle m, M\rangle$, the interval $\langle m, M\rangle$ is so proper (non-degenerate) and it has the length at least 2 .
For $x=m$ we have
$$
P(2 m+\alpha) \leq 0
$$
This implies $m \leq 2 m+\alpha$ and therefore $-\alpha \leq m$. Analogously for $x=M$ we obtain
$$
P(2 M+\alpha) \leq 0
$$
This yields $2 M+\alpha \leq M$ and $M \leq-\alpha$. It follows altogether $m=M=-\alpha$, which contradicts the fact that $\langle m, M\rangle$ is the proper interval. This finally proves that non-zero polynomial $P$ satisfying the problem does not exist.
## Problem T-3
There are $n$ boys and $n$ girls in a school class, where $n$ is a positive integer. The heights of all the children in this class are distinct. Every girl determines the number of boys that are taller than her, subtracts the number of girls that are taller than her, and writes the result on a piece of paper. Every boy determines the number of girls that are shorter than him, subtracts the number of boys that are shorter than him, and writes the result on a piece of paper. Prove that the numbers written down by the girls are the same as the numbers written down by the boys (up to a permutation).
(proposed by Stephan Wagner, Austria)
Solution. We prove the statement by induction. The case $n=1$ is easy (either both children write down 0 , or both write down 1). For the induction step, suppose that the children are standing in a row in order of height (the tallest first), and consider a boy and a girl standing next to each other (such a pair must clearly always exist). If $k$ boys and $\ell$ girls are taller than these two, then either both write down $k-\ell=(n-\ell-1)-(n-k-1)$ (if the girl is taller), or both write down $(k+1)-\ell=(n-\ell)-(n-k-1)$ (if the boy is taller).
If we remove these two children from the class, the numbers of all the other children would remain the same (the boy and the girl cancel in the other children's calculations). Thus we are done by the induction hypothesis.
Remark. This solution can be modified in many ways. For example, instead of removing the two children, we can let them "switch heights". This can be repeated until we reach the situation that all boys are taller than all girls (or vice versa), in which case the numbers are easy to determine.
## Problem T-4
Prove that every integer from 1 to 2019 can be represented as an arithmetic expression consisting of up to 17 symbols 2 and an arbitrary number of additions, subtractions, multiplications, divisions and brackets. The 2's may not be used for any other operation, for example to form multi-digit numbers (such as 222) or powers (such as $2^{2}$ ).
Valid examples:
$$
\left((2 \times 2+2) \times 2-\frac{2}{2}\right) \times 2=22, \quad(2 \times 2 \times 2-2) \times\left(2 \times 2+\frac{2+2+2}{2}\right)=42
$$
Solution 1. We will first prove by induction that every even number less than $2^{n}$ can be written with at most $\frac{3}{2} n-1$ 's. This is certainly true for $n=2$ and $n=3$ with $2=2,4=2+2$ and $6=2+2+2$.
Let $k \geq 8$ be an even number $<2^{n}$. If it is divisible by 4 , it can be written as $2\left(\frac{k}{2}\right)$ which needs at most $1+\frac{3}{2}(n-1)-1<\frac{3}{2} n-1$ by induction. If $k \equiv 2(\bmod 4)$, then $k=2+2 \cdot 2 k^{\prime}$ where $k^{\prime}<2^{n-2}$. If $k^{\prime}$ is an even number, then we obtain $k$ using at most $1+2+\frac{3}{2}(n-2)-1=\frac{3}{2} n-1$ 2 's, by induction. If $k^{\prime}$ is odd, then $k^{\prime}+1$ is even and we have $k=2 \cdot 2\left(k^{\prime}+1\right)-2$. If $k^{\prime}+1<2^{n-2}$ then we can use induction again to get $k$ with at most $1+2+\frac{3}{2}(n-2)-1=\frac{3}{2} n-12$ 's. If $k^{\prime}+1=2^{n-2}$, we obtain $k=2 \cdot 2 \cdot 2^{n-2}-2$ using $n+12$ 's which is less or equal to $\frac{3}{2} n-1$ since $n \geq 4$. This finishes the proof for even numbers.
Obviously, any odd number can be obtained from an even number by adding $\frac{2}{2}$, so any odd number less than $2^{n}$ can be obtained by at most $\frac{3}{2} n-1+2=\frac{3}{2} n+12$ 's, which for $n=11$ yields 172 's.
Solution 2. It is enough to show that all multiples of 4 can be written using at most 15 2's (since numbers not divisible by 4 can be written as $N+2$ or $N \pm \frac{2}{2}$ where $N$ is divisible by 4). So, let $N$ be divisible by 4 and let its binary representation be $N=2^{a_{1}}+\cdots+2^{a_{k}}$ with $a_{1}>a_{2}>\cdots>a_{k}>1$. Since $N<2019$ we have $a_{1} \leq 10$. Observe that $k$ is the number of 1 's in the binary representation of $N$. We distinguish two cases:
1st case: Let $k \leq 6$, i.e. there are at most six 1 's in the binary representation of $N$. Then we can write
$$
N=2^{a_{k}-1}\left(2+2^{a_{k-1}-a_{k}}\left(2+2^{a_{k-2}-a_{k-1}}\left(2+\ldots\left(2+2^{a_{1}-a_{2}+1}\right)\right)\right)\right)
$$
If we rewrite all powers using multiplication, we obtain an expression with $a_{k}-1+a_{k-1}-a_{k}+$ $\cdots+a_{1}-a_{2}+1=a_{1} 2$ 's comming from powers and one additional 2 added in each bracket. Since there are $k-1$ brackets, we need $a_{1}+k-1 \leq 10+5=152$ 's to represent $N$.
2nd case: Let $k \geq 7$. Then we can write $N=2^{11}-1-2^{b_{1}}-2^{b_{2}}-\cdots-2^{b_{l}}$, where $b_{1}>b_{2}>\cdots>b_{l}$ are the positions of zeros in the binary representation of $N$. Since $N$ is divisible by 4 , we have $b_{l}=0, b_{l-1}=1$. Similarly to the first case, we have
$$
N=2^{11}-2^{b_{1}}-\cdots-2^{b_{l-2}}-4=2\left(2^{b_{l-2}-2}\left(2^{b_{l-3}-b_{l-2}}\left(\ldots\left(2^{11-b_{1}+1}-2\right) \ldots\right)-2\right)-2\right)
$$
If we expand powers into multiplications, the number of multiplicating 2 's is $1+\left(b_{l-2}-2\right)+$ $\left(b_{l-3}-b_{l-2}\right)+\cdots+11-b_{1}+1=11$ and the number of 2 's after minus signs in exactly $l-1$, i.e. at most $10+l$ 's in total. Since $k \geq 7$, there are at most four zeros in the binary representation of $N$, i.e. $l \leq 4$ and $10+l \leq 15$, which completes the proof.
## Problem T-5
Let $A B C$ be an acute-angled triangle such that $A B0
$$
it follows from $c>b-a>0$ and $a-1 \geq a+b-c>0$ that
$$
A=c(a-1)+b>c(a-1)>(b-a)(a+b-c)=C
$$
Thus $A>C>0$, which implies that $A$ does not divide $C$, a contradiction.
Solution 2 It suffices to verify that
$$
\frac{b-1}{a}<\frac{c(b-1)+a}{c(a-1)+b}<\frac{b}{a}
$$
because no integer lies between the two fractions $\frac{b-1}{a}$ and $\frac{b}{a}$. Routine algebraic manipulations show that the left-hand inequality is equivalent to
$$
c>b-\frac{a^{2}}{b-1}, \quad \text { where } \quad \frac{a^{2}}{b-1}>0
$$
while the right-hand inequality is equivalent to $ca$ by the conditions of the problem. Besides, since $A \mid B$ and $A, B$ are clearly positive, we have $B \geq A$ as well.
Let $n \geq 1$ be now an integer such that $b \geq n a$ and $B \geq n A$. Our goal is to prove that $b \geq(n+1) a$ and $B \geq(n+1) A$ as well. Firstly we verify that $B>n A$. If $b>n a$, then
$$
B-n A=c(b-1-a n)+c n+a-n b \geq c n+a-n b=n(c-b)+a>a>0
$$
and we are done. On the other hand, if $b=n a$, then $n b-a=(n-1)(a+b)$ and hence the nonnegative number $B-n A$ can be written as
$$
B-n A=(n-1) c-(n b-a)=(n-1) c-(n-1)(a+b)=(n-1)(c-a-b)
$$
which means that $n=1$ (because of $cn A$ is proven. Since $A \mid(B-n A)$, we have $B-n A \geq A$, i.e. $B \geq(n+1) A$. To finish the second induction step, it remains to prove that $b \geq(n+1) a$.
The proved inequality $B \geq(n+1) A$ means that
$$
c(b-(n+1) a+n) \geq(n+1) b-a
$$
Since $b \geq n a$ implies that $a \leq \frac{b}{n}$ and hence $\frac{n+1}{n} b \geq a+b>c$, we can conclude the following:
$$
(n+1) b-a \geq\left((n+1)-\frac{1}{n}\right) b=\frac{n(n+1)-1}{n+1} \cdot \frac{n+1}{n} b>\frac{n(n+1)-1}{n+1} c=\left(n-\frac{1}{n+1}\right) c
$$
Comparing this with the preceding inequality, we get
$$
b-(n+1) a+n>n-\frac{1}{n+1}, \quad \text { or } \quad b-(n+1) a>-\frac{1}{n+1}>-1
$$
hence the integer $b-(n+1) a$ is nonnegative, as we wished to prove.
## Problem T-8
Let $N$ be a positive integer such that the sum of the squares of all positive divisors of $N$ is equal to the product $N(N+3)$. Prove that there exist two indices $i$ and $j$ such that $N=F_{i} \cdot F_{j}$, where $\left(F_{n}\right)_{n=1}^{\infty}$ is the Fibonacci sequence defined by $F_{1}=F_{2}=1$ and $F_{n}=F_{n-1}+F_{n-2}$ for all $n \geq 3$.
## (proposed by Alain Rossier, Switzerland)
Solution Denote by $1=d_{1}0$ implies that $k \geq 3$. However, if $k=3$, then $N=p^{2}$ with some prime $p=d_{2}$ satisfying $p^{2}=3 p^{2}-1$, which is impossible. Thus $k \geq 4$.
For each $i=2,3, \ldots, k-1$, we have $d_{i} d_{k+1-i}=N$ and hence $d_{i}^{2}+d_{k+1-i}^{2} \geq 2 N$ by the AM-GM inequality. Consequently,
$$
3 N-1=\sum_{i=2}^{k-1} d_{i}^{2}=\frac{1}{2} \sum_{i=2}^{k-1}\left(d_{i}^{2}+d_{k+1-i}^{2}\right) \geq \frac{1}{2}(k-2) \cdot 2 N=(k-2) N
$$
However, $3 N-1 \geq(k-2) N$ means that $k \leq 5-\frac{1}{N}<5$, which together with the previous fact that $k \geq 4$ leads to the equality $k=4$. Thus either $N=p^{3}$ with $p$ being a prime and our equation becomes $p^{2}+p^{4}=3 p^{3}-1$, or $N$ has a factorization $N=p q$, with some primes $p>q$ and our equation becomes $p^{2}+q^{2}=3 p q-1$. As the first case cannot have any solutions, we conclude that the latter must be true.
Notice that the equation $p^{2}+q^{2}=3 p q-1$ has 'prime' solutions $(p, q)=(5,2)=\left(F_{5}, F_{3}\right)$ and $(p, q)=(13,5)=\left(F_{7}, F_{5}\right)$. This encourages us to prove a more general fact: Any solution $(a, b)$ of the equation $a^{2}+b^{2}=3 a b-1$ with positive integers $a>b$ is of the form $(a, b)=\left(F_{2 i+1}, F_{2 i-1}\right)$, for some $i \geq 1$. After proving it, we get the desired representation $N=p q=F_{2 i+1} F_{2 i-1}$.
Assume to the contrary that there exist integers $a>b>0$ such that $a^{2}+b^{2}=3 a b-1$ but no $i$ such that $a=F_{2 i+1}$ and $b=F_{2 i-1}$. Among all such pairs $(a, b)$, take the one with $b$ minimal. By Vieta's formulas, the equation $a^{2}+b^{2}=3 a b-1$ remains to hold if we replace $a$ by the number $a^{\prime}$ that satisfies $a+a^{\prime}=3 b$ and $a a^{\prime}=b^{2}+1$. In view of the symmetry, the solutions of the equation are then not only pairs $(a, b)$ and $\left(a^{\prime}, b\right)$, but $\left(b, a^{\prime}\right)$ as well.
Note that the number $a^{\prime}=3 b-a$ is an integer which is positive, because of $a>0$ and $a a^{\prime}=b^{2}+1>0$. Moreover, $a \geq b+1$ implies that
$$
a^{\prime}=\frac{b^{2}+1}{a} \leq \frac{b^{2}+1}{b+1}=b-\frac{b-1}{b+1} \leq b
$$
Thus $a^{\prime}