2018 Pan African

1

Find all functions $f : \mathbb Z \to \mathbb Z$ such that $$(f(x + y))^2 = f(x^2) + f(y^2)$$for all $x, y \in \mathbb Z$.

Solution Plug in $y=-x$, and let $c=f(0)$. We have $f(x^2) = c^2/2$. Plugging in $y=0$, we have $f(x)^2 = c^2/2 + c$. Plugging in $x=0$ in this gives $c=0$ or $c=2$. Now if $c=0$, $f \equiv 0$ is the only solution. Else we have $f(x) = \pm 2$ for all $x$. This means $f(x^2) + f(y^2) = 4$, always, so for all $x$ being perfect squares, $f(x)=2$. So the solution in this case becomes $f(x) = 2$ for all perfect square $x$ and $\pm 2$ for all other $x$. It is easy to check that the solutions mentioned above work.

2

A chess tournament is held with the participation of boys and girls. The girls are twice as many as boys. Each player plays against each other player exactly once. By the end of the tournament, there were no draws and the ratio of girl winnings to boy winnings was $\frac{7}{9}$. How many players took part at the tournament?

Solution Let $g_1,g_2, \ldots, g_{2x}$ be th girls and $b_1,b_2, \ldots, b_x$ be the boys. Let $G,B$ be the total wins of girls and boys, respectively. In total, $\binom{3x}{2}$ matches were played, so we have in total $\binom{3x}{2}$ wins. So, $G+B=\dfrac{(3x-1)3x}{2}$. Also, we know that $\dfrac{G}{B}=\dfrac{7}{9}$, so $\dfrac{16G}{7}=\dfrac{(3x-1)3x}{2}$. The games played by two girls are $2x^2-x$, so $G \geqslant 2x^2-x \Rightarrow \dfrac{(3x-1)3x}{2} \geqslant \dfrac{32x^2-16x}{7} \Rightarrow x \leqslant 11$. But, we must have $G=\dfrac{21x(3x-1)}{32}$, so $32 \mid 3x^2-x$ and since $x \leqslant 11$, we can easily obtain $x=11$. We can now construct an example to show that this value is attainable, so $\boxed{33}$ players took part.

3

For any positive integer $x$, we set $$ g(x) = \text{ largest odd divisor of } x, $$$$ f(x) = \begin{cases} \frac{x}{2} + \frac{x}{g(x)} & \text{ if } x \text{ is even;} \\ 2^{\frac{x+1}{2}} & \text{ if } x \text{ is odd.} \end{cases} $$ Consider the sequence $(x_n)_{n \in \mathbb{N}}$ defined by $x_1 = 1$, $x_{n + 1} = f(x_n)$. Show that the integer $2018$ appears in this sequence, determine the least integer $n$ such that $x_n = 2018$, and determine whether $n$ is unique or not.

Solution It's easy to see using induction that the general term of the series is $$a_n = 2^{\lfloor \sqrt{2n + \frac{1}{4}} - \frac{1}{2} \rfloor + \frac{1}{2} \cdot \lfloor \sqrt{2n + \frac{1}{4}} - \frac{1}{2} \rfloor \cdot \lfloor \sqrt{2n + \frac{1}{4}} + \frac{1}{2} \rfloor - n} \cdot \left( 2n - \lfloor \sqrt{2n + \frac{1}{4}} - \frac{1}{2} \rfloor \cdot \lfloor \sqrt{2n + \frac{1}{4}} + \frac{1}{2} \rfloor + 1 \right)$$ This basically says that when we express the elements in an array of the form $$\begin{array}{cccc} a_1,\\ a_2, & a_3\\ a_4, & a_5, & a_6\\ \vdots & \vdots & \vdots \\ a_{\frac{n(n+1)}{2}+1}, & a_{\frac{n(n+1)}{2}+2}, &\cdots , & a_{\frac{n(n+1)}{2}+n}\end{array}$$ We get this : $$\begin{array}{cccc} 2^0 \cdot 1,\\ 2^1 \cdot 1, & 2^0 \cdot 3\\ 2^2 \cdot 1, & 2^1 \cdot 3, & 2^0 \cdot 5\\ \vdots & \vdots & \vdots \\ 2^n \cdot 1, & 2^{n-1} \cdot 3, &\cdots , & 2^0 \cdot (2n-1) \end{array}$$ So $2018$ appears once, and exactly once in the sequence.

4

Given a triangle $ABC$, let $D$ be the intersection of the line through $A$ perpendicular to $AB$, and the line through $B$ perpendicular to $BC$. Let $P$ be a point inside the triangle. Show that $DAPB$ is cyclic if and only if $\angle BAP = \angle CBP$.

Solution $\angle CBP = 90^\circ - \angle DBP$, so let the perpendicular to $PB$ at $P$ meet $BD$ at $X$. Then if $\angle BAP = \angle CBP$, we have $\angle PXB = \angle PAB$, so $XAPB$ is cyclic. So, $\angle BAX = 90^\circ$, so $X \equiv D$. If $DAPB$ is cyclic, $\angle PAB = \angle PDB = 90^\circ - \angle DBP = \angle CBP$, so done. Note : directed angles make this solution complete, but I'm lazy enough to direct them.

5

Let $a$, $b$, $c$ and $d$ be non-zero pairwise different real numbers such that $$ \frac{a}{b} + \frac{b}{c} + \frac{c}{d} + \frac{d}{a} = 4 \text{ and } ac = bd. $$ Show that $$ \frac{a}{c} + \frac{b}{d} + \frac{c}{a} + \frac{d}{b} \leq -12 $$and that $-12$ is the maximum.

Solution We firstly write $d=\frac{ac}{b}$ so we have $\frac{a}{b}+\frac{b}{a}+\frac{b}{c}+\frac{c}{b}=4$ and we want to show that $\frac{a}{c}+\frac{c}{a}+\frac{b^2}{ac}+\frac{ac}{b^2}$ or equivalently $(\frac{a}{b}+\frac{b}{a})(\frac{c}{b}+\frac{b}{c}) \leqslant -12$. Set $\frac{a}{b}+\frac{b}{a}=s$ and $\frac{c}{b}+\frac{b}{c}=t$. We have $s+t=4$ and we want $st \leqslant -12$. We have $t=4-s$ and so we need $s(4-s) \leqslant -12 \Rightarrow s^2-4s-12 \geqslant 0$. If $s \leqslant -2$, this holds (indeed, set $s=-2+k$ and we have $s^2-4s-12=(k-2)^2-4(k-2)-12=k^2-8k-16=(k-4)^2 \geqslant 0$. So ,assume that $s \geqslant -2$. Similarly, assume $t \geqslant -2$. We have then $\frac{a}{b}+\frac{b}{a} \geqslant -2 \Rightarrow \frac{(a+b)^2}{ab}>0$, so $ab>0$ and $bc>0$, so $a,b,c,$ are of the same sign, so $4=\frac{a}{b}+\frac{b}{a}+\frac{b}{c}+\frac{c}{b} \geqslant 2+2=4$, so $a=b=c$, contradiction, since $a \neq b \neq c \neq a$. So, at least one of $s,t$ is $\leqslant -2$ and the stated inequality holds. The equality e.g. when $(a,b,c,d)=(2\sqrt{2}-3,3-2\sqrt{2},1,-1)$ (and this shows that $-12$ is the maximum).

6

A circle is divided into $n$ sectors ($n \geq 3$). Each sector can be filled in with either $1$ or $0$. Choose any sector $\mathcal{C}$ occupied by $0$, change it into a $1$ and simultaneously change the symbols $x, y$ in the two sectors adjacent to $\mathcal{C}$ to their complements $1-x$, $1-y$. We repeat this process as long as there exists a zero in some sector. In the initial configuration there is a $0$ in one sector and $1$s elsewhere. For which values of $n$ can we end this process?

Solution Let the numbers in the sectors be $x_1, x_2, \dots, x_n$, and suppose that initially $x_1 = 0$, while $x_i = 1$ for $i > 0$. After choosing the only zero available, we have that $x_n = x_2 = 0$, and $x_i = 1$ otherwise. Suppose that we are in the position where $x_n = 0$, $x_1 = x_2 = \dots = x_k = 0$, $x_{k+1} = 1$, and $x_{k+2} = 0$. By choosing the $0$ in position $k+2$, we then obtain the configuration where $x_n = 0$, $x_1 = x_2 = \dots = x_{k + 1} = 0$, $x_{k+2} = 1$ and $x_{k + 3} = 0$. Thus continuing in this way, we obtain the configuration where $x_{n-2} = 1$, and $x_i = 0$ otherwise. If $n \equiv 1 \pmod 3$, then at this point we can divide the $0$ into groups of $3$ and apply the procedure to the $0$ in the middle of each group to contain a configuration where each sector contains a $1$. If $n \equiv 2 \pmod 3$, then we apply the procedure to the $0$ in sector $n-1$ to obtain the configuration where $x_{n-1} = x_n = 1$, and $x_i = 0$ otherwise. We can then again divide the remaining $0$s into groups of $3$ and apply the procedure to the $0$ in the middle of each group. Finally, we show that if $n \equiv 0 \pmod 3$, then the procedure never terminates. Let $A = x_1 + x_4 + \dots + x_{n-2}$, $B = x_2 + x_5 + \dots + x_{n-1}$, and $C = x_3 + x_6 + \dots + x_n$. We note that we initially have that $A = \frac{n}{3} - 1$, and $B = C = \frac{n}{3}$, while in the configuration where every sector contains a $1$ we have that $A = B = C = \frac{n}{3}$. We now note that the allowed operation changes the parity of $A$, $B$, and $C$. In particular, we always have that $A$, $B$, and $C$ do not all have the same parity, and so it is not possible to obtain a configuration where $A = B = C$.