# The 29th Nordic Mathematical Contest Tuesday, March 24, 2015 Solutions ## Problem 1. Let $A B C$ be a triangle and $\Gamma$ the circle with diameter $A B$. The bisectors of $\angle B A C$ and $\angle A B C$ intersect $\Gamma$ (also) at $D$ and $E$, respectively. The incircle of $A B C$ meets $B C$ and $A C$ at $F$ and $G$, respectively. Prove that $D, E, F$ and $G$ are collinear. Solution 1. Let the line $E D$ meet $A C$ at $G^{\prime}$ and $B C$ at $F^{\prime} . A D$ and $B E$ intersect at $I$, the incenter of $A B C$. As angles subtending the same arc $\widehat{B D}$, $\angle D A B=\angle D E B=\angle G^{\prime} E I$. But $\angle D A B=\angle C A D=$ $\angle G^{\prime} A I$. This means that $E, A, I$ and $G^{\prime}$ are concyclic, and $\angle A E I=\angle A G^{\prime} I$ as angles subtending the same chord $A I$. But $A B$ is a diameter of $\Gamma$, and so $\angle A E B=$ $\angle A E I$ is a right angle. So $I G^{\prime} \perp A C$, or $G^{\prime}$ is the foot of the perpendicular from $I$ to $A C$. This implies $G^{\prime}=G$. In a similar manner we prove that $F^{\prime}=F$, and the proof is complete.  Solution 2. (Read the attached figure so that $F^{\prime}$ and $G^{\prime}$ are as $F$ and $G$ in the problem text.) The angles $\angle A E I=\angle A E B$ and $\angle A G I$ are right angles. This means that $A I G E$ is a cyclic quadrilateral. But then $\angle B E G=\angle I E G=\angle I A G=\angle D A C=\angle D A B=\angle B E D$, implying that $G$ and $D$ are on the same line through $E$. The same argument shows $F$ and $E$ are on the same line through $D$. So the points $G$ and $F$ are on the line $E D$. ## Problem 2. Find the primes $p, q, r$, given that one of the numbers $p q r$ and $p+q+r$ is 101 times the other. Solution. We may assume $r=\max \{p, q, r\}$. Then $p+q+r \leq 3 r$ and $p q r \geq 4 r$. So the sum of the three primes is always less than their product. The only relevant requirement thus is $p q r=101(p+q+r)$. We observe that 101 is a prime. So one of $p, q, r$ must be 101. Assume $r=101$. Then $p q=p+q+101$. This can be written as $(p-1)(q-1)=102$. Since $102=1 \cdot 102=2 \cdot 51=3 \cdot 34=6 \cdot 17$, the possibilities for $\{p, q\}$ are $\{2,103\},\{3,52\},\{4,35\},\{7,18\}$ The only case, where both the numbers are primes, is $\{2,103\}$. So the only solution to the problem is $\{p, q, r\}=\{2,101,103\}$. ## Problem 3. Let $n>1$ and $p(x)=x^{n}+a_{n-1} x^{n-1}+\cdots+a_{0}$ be a polynomial with $n$ real roots (counted with multiplicity). Let the polynomial $q$ be defined by $$ q(x)=\prod_{j=1}^{2015} p(x+j) $$ We know that $p(2015)=2015$. Prove that $q$ has at least 1970 different roots $r_{1}, \ldots, r_{1970}$ such that $\left|r_{j}\right|<2015$ for all $j=1, \ldots, 1970$. Solution. Let $h_{j}(x)=p(x+j)$. Consider $h_{2015}$. Like $p$, it has $n$ real roots $s_{1}, s_{2}, \ldots, s_{n}$, and $h_{2015}(0)=p(2015)=2015$. By Viète, the product $\left|s_{1} s_{2} \cdots s_{n}\right|$ equals 2015. Since $n \geq 2$, there is at least one $s_{j}$ such that $\left|s_{j}\right| \leq \sqrt{2015}<\sqrt{2025}=45$. Denote this $s_{j}$ by $m$. Now for all $j=0,1, \ldots, 2014, h_{2015-j}(m+j)=p(m+j+2015-j)=p(m+2015)=$ $h_{2015}(m)=0$. So $m, m+1, \ldots, m+2014$ are all roots of $q$. Since $0 \leq|m|<45$, the condition $|m+j|<2015$ is satisfied by at least 1970 different $j, 0 \leq j \leq 2014$, and we are done. ## Problem 4. An encyclopedia consists of 2000 numbered volumes. The volumes are stacked in order with number 1 on top and 2000 in the bottom. One may perform two operations with the stack: (i) For $n$ even, one may take the top $n$ volumes and put them in the bottom of the stack without changing the order. (ii) For $n$ odd, one may take the top $n$ volumes, turn the order around and put them on top of the stack again. How many different permutations of the volumes can be obtained by using these two operations repeatedly? Solution 1. (By the proposer.) Let the positions of the books in the stack be $1,2,3, \ldots, 2000$ from the top (and consider them modulo 2000). Notice that both operations fix the parity of the number of the book at a any given position. Operation (i) subtracts an even integer from the number of the book at each position. If $A$ is an operation of type (i), and $B$ is an operation of type (ii), then the operation $A^{-1} B A$ changes the order of the books in the positions $n+1$ to $n+m$ where $n$ is even and $m$ is odd. This is called turning the interval. Now we prove that all the volumes in odd positions can be placed in the odd positions in every way we like: If the volume we want in position 1 is in position $m_{1}$, we turn the interval 1 to $m_{1}$. Now if the volume we want in position 3 is in position $m_{3}$, we turn the interval 3 to $m_{3}$, and so on. In this way we can permute the volumes in odd positions exactly as we want to. Now we prove that we can permute the volumes in even positions exactly as we want without changing the positions of the volumes in the odd positions: We can make a transposition of the two volumes in position $2 n$ and $2 n+2 m$ by turning the interval $2 n+1$ to $2 n+2 m-1$, then turning the interval $2 n+2 m+1$ to $2 n-1$, then turning the interval $2 n+1$ to $2 n-1$, and finally adding $2 m$ to the number of the volume in each position. Since there are 1000! permutations of the volumes in the odd positions, and 1000! permutations of the volumes in the even positions, altogether we have (1000!) ${ }^{2}$ different permutations. Solution 2. We show that the volumes can be permuted so that the volumes with odd numbers are in an arbitrary order in the odd-numbered palaces and the volumes with even numbers are in an arbitrary order in the even-numbered places. The main idea is to construct two combinations of the allowed operations. The first one turns the volumes in a specified interval, starting and ending in an odd-numbered place, in the opposite order while keeping everything outside this interval fixed, or keeps everything fixed in an interval while turning the order of the volumes outside this interval in the opposite direction, when the counting starts below that interval and is continued from the top after reaching the bottom volume. The second combined operation just exchanges two volumes in evennumbered places while keeping everything else fixed. - It is clear that 2000 is not a special number, and it could be replaced by a generic even integer. However, we formulate the proof according to the problem text. Let $E=\{1,2, \ldots, 2000\}$. We formulate the operations described in conditions (i) and (ii), depending on an even integer $n$ and odd integer $m$ as functions $f_{n}: E \rightarrow E$ and $g_{m}: E \rightarrow E$, defined by $$ f_{n}(p)=\left\{\begin{array}{ll} 2000+p-n & \text { for } p \geq n, \\ p-n & \text { for } n
2000$. By the definition of $f_{n}$, $f_{n}(n+m-2000)=2000+(n+m-2000)-n=m$, and so $f_{n}[n+m-2000+1, n]=[m+$ 1, 2000] Consequently, $f_{n}^{-1} \circ g_{m} \circ f_{n}$ keeps numbers in the interval $[n+m-2000+1, n]$ (with even endpoints) fixed. Since $g_{m}$ turns the order around in $[1, m]$ and $f_{n}^{-1}=f_{2000-n}$ maps $[1, m]$ onto the complement of $[n+m-2000+1, n]$ in such a way that $f_{2000-1}(1)=n+1$, the
order of numbers in the complement is reversed in the desired manner. - We have shown that for odd $s$ and $t$ such that $t