UKR   Let the sides $A D$ and $B C$ of the quadrilateral $A B C D$ (such that $A B$ is not parallel to $C D$ ) intersect at point $P$. Points $O_{1}$ and $O_{2}$ are the circumcenters and points $H_{1}$ and $H_{2}$ are the orthocenters of triangles $A B P$ and $D C P$, respectively. Denote the midpoints of segments $O_{1} H_{1}$ and $O_{2} H_{2}$ by $E_{1}$ and $E_{2}$, respectively. Prove that the perpendicular from $E_{1}$ on $C D$, the perpendicular from $E_{2}$ on $A B$ and the line $H_{1} H_{2}$ are concurrent.

Solution: We keep triangle $A B P$ fixed and move the line $C D$ parallel to itself uniformly, i.e. linearly dependent on a single parameter $\lambda$ (see Figure 1). Then the points $C$ and $D$ also move uniformly. Hence, the points $O_{2}, H_{2}$ and $E_{2}$ move uniformly, too. Therefore also the perpendicular from $E_{2}$ on $A B$ moves uniformly. Obviously, the points $O_{1}, H_{1}, E_{1}$ and the perpendicular from $E_{1}$ on $C D$ do not move at all. Hence, the intersection point $S$ of these two perpendiculars moves uniformly. Since $H_{1}$ does not move, while $H_{2}$ and $S$ move uniformly along parallel lines (both are perpendicular to $C D$ ), it is sufficient to prove their collinearity for two different positions of $C D$. ![](https://cdn.mathpix.com/cropped/2024_11_18_b191c9407e8cb3d672cbg-62.jpg?height=897&width=895&top_left_y=1162&top_left_x=592)  Figure 1 Let $C D$ pass through either point $A$ or point $B$. Note that by hypothesis these two cases are different. We will consider the case $A \in C D$, i.e. $A=D$. So we have to show that the perpendiculars from $E_{1}$ on $A C$ and from $E_{2}$ on $A B$ intersect on the altitude $A H$ of triangle $A B C$ (see Figure 2). ![](https://cdn.mathpix.com/cropped/2024_11_18_b191c9407e8cb3d672cbg-63.jpg?height=971&width=749&top_left_y=197&top_left_x=659)  Figure 2  To this end, we consider the midpoints $A_{1}, B_{1}, C_{1}$ of $B C, C A, A B$, respectively. As $E_{1}$ is the center of Feuerbach's circle (nine-point circle) of $\triangle A B P$, we have $E_{1} C_{1}=E_{1} H$. Similarly, $E_{2} B_{1}=E_{2} H$. Note further that a point $X$ lies on the perpendicular from $E_{1}$ on $A_{1} C_{1}$ if and only if  $$ X C_{1}^{2}-X A_{1}^{2}=E_{1} C_{1}^{2}-E_{1} A_{1}^{2} $$  Similarly, the perpendicular from $E_{2}$ on $A_{1} B_{1}$ is characterized by  $$ X A_{1}^{2}-X B_{1}^{2}=E_{2} A_{1}^{2}-E_{2} B_{1}^{2} $$  The line $H_{1} H_{2}$, which is perpendicular to $B_{1} C_{1}$ and contains $A$, is given by  $$ X B_{1}^{2}-X C_{1}^{2}=A B_{1}^{2}-A C_{1}^{2} $$  The three lines are concurrent if and only if  $$ \begin{aligned} 0 & =X C_{1}^{2}-X A_{1}^{2}+X A_{1}^{2}-X B_{1}^{2}+X B_{1}^{2}-X C_{1}^{2} \\ & =E_{1} C_{1}^{2}-E_{1} A_{1}^{2}+E_{2} A_{1}^{2}-E_{2} B_{1}^{2}+A B_{1}^{2}-A C_{1}^{2} \\ & =-E_{1} A_{1}^{2}+E_{2} A_{1}^{2}+E_{1} H^{2}-E_{2} H^{2}+A B_{1}^{2}-A C_{1}^{2} \end{aligned} $$  i.e. it suffices to show that  $$ E_{1} A_{1}^{2}-E_{2} A_{1}^{2}-E_{1} H^{2}+E_{2} H^{2}=\frac{A C^{2}-A B^{2}}{4} $$  We have  $$ \frac{A C^{2}-A B^{2}}{4}=\frac{H C^{2}-H B^{2}}{4}=\frac{(H C+H B)(H C-H B)}{4}=\frac{H A_{1} \cdot B C}{2} $$  Let $F_{1}, F_{2}$ be the projections of $E_{1}, E_{2}$ on $B C$. Obviously, these are the midpoints of $H P_{1}$, $H P_{2}$, where $P_{1}, P_{2}$ are the midpoints of $P B$ and $P C$ respectively. Then  $$ \begin{aligned} & E_{1} A_{1}^{2}-E_{2} A_{1}^{2}-E_{1} H^{2}+E_{2} H^{2} \\ & =F_{1} A_{1}^{2}-F_{1} H^{2}-F_{2} A_{1}^{2}+F_{2} H^{2} \\ & =\left(F_{1} A_{1}-F_{1} H\right)\left(F_{1} A_{1}+F_{1} H\right)-\left(F_{2} A_{1}-F_{2} H\right)\left(F_{2} A_{1}+F_{2} H\right) \\ & =A_{1} H \cdot\left(A_{1} P_{1}-A_{1} P_{2}\right) \\ & =\frac{A_{1} H \cdot B C}{2} \\ & =\frac{A C^{2}-A B^{2}}{4} \end{aligned} $$  which proves the claim.


Solution: Let the perpendicular from $E_{1}$ on $C D$ meet $P H_{1}$ at $X$, and the perpendicular from $E_{2}$ on $A B$ meet $P H_{2}$ at $Y$ (see Figure 3). Let $\varphi$ be the intersection angle of $A B$ and $C D$. Denote by $M, N$ the midpoints of $P H_{1}, P H_{2}$ respectively. ![](https://cdn.mathpix.com/cropped/2024_11_18_b191c9407e8cb3d672cbg-64.jpg?height=754&width=1069&top_left_y=1185&top_left_x=499)  Figure 3 We will prove now that triangles $E_{1} X M$ and $E_{2} Y N$ have equal angles at $E_{1}, E_{2}$, and supplementary angles at $X, Y$. In the following, angles are understood as oriented, and equalities of angles modulo $180^{\circ}$. Let $\alpha=\angle H_{2} P D, \psi=\angle D P C, \beta=\angle C P H_{1}$. Then $\alpha+\psi+\beta=\varphi, \angle E_{1} X H_{1}=\angle H_{2} Y E_{2}=\varphi$, thus $\angle M X E_{1}+\angle N Y E_{2}=180^{\circ}$. By considering the Feuerbach circle of $\triangle A B P$ whose center is $E_{1}$ and which goes through $M$, we have $\angle E_{1} M H_{1}=\psi+2 \beta$. Analogous considerations with the Feuerbach circle of $\triangle D C P$ yield $\angle H_{2} N E_{2}=\psi+2 \alpha$. Hence indeed $\angle X E_{1} M=\varphi-(\psi+2 \beta)=(\psi+2 \alpha)-\varphi=\angle Y E_{2} N$. It follows now that  $$ \frac{X M}{M E_{1}}=\frac{Y N}{N E_{2}} $$  Furthermore, $M E_{1}$ is half the circumradius of $\triangle A B P$, while $P H_{1}$ is the distance of $P$ to the orthocenter of that triangle, which is twice the circumradius times the cosine of $\psi$. Together with analogous reasoning for $\triangle D C P$ we have  $$ \frac{M E_{1}}{P H_{1}}=\frac{1}{4 \cos \psi}=\frac{N E_{2}}{P H_{2}} $$  By multiplication,  $$ \frac{X M}{P H_{1}}=\frac{Y N}{P H_{2}} $$  and therefore  $$ \frac{P X}{X H_{1}}=\frac{H_{2} Y}{Y P} $$  Let $E_{1} X, E_{2} Y$ meet $H_{1} H_{2}$ in $R, S$ respectively. Applying the intercept theorem to the parallels $E_{1} X, P H_{2}$ and center $H_{1}$ gives  $$ \frac{H_{2} R}{R H_{1}}=\frac{P X}{X H_{1}} $$  while with parallels $E_{2} Y, P H_{1}$ and center $H_{2}$ we obtain  $$ \frac{H_{2} S}{S H_{1}}=\frac{H_{2} Y}{Y P} $$  Combination of the last three equalities yields that $R$ and $S$ coincide.


IRN   Let $A B C$ be a triangle with incenter $I$ and let $X, Y$ and $Z$ be the incenters of the triangles $B I C, C I A$ and $A I B$, respectively. Let the triangle $X Y Z$ be equilateral. Prove that $A B C$ is equilateral too.

Solution: $A Z, A I$ and $A Y$ divide $\angle B A C$ into four equal angles; denote them by $\alpha$. In the same way we have four equal angles $\beta$ at $B$ and four equal angles $\gamma$ at $C$. Obviously $\alpha+\beta+\gamma=\frac{180^{\circ}}{4}=45^{\circ}$; and $0^{\circ}<\alpha, \beta, \gamma<45^{\circ}$. ![](https://cdn.mathpix.com/cropped/2024_11_18_b191c9407e8cb3d672cbg-66.jpg?height=629&width=938&top_left_y=802&top_left_x=562)  Easy calculations in various triangles yield $\angle B I C=180^{\circ}-2 \beta-2 \gamma=180^{\circ}-\left(90^{\circ}-2 \alpha\right)=$ $90^{\circ}+2 \alpha$, hence (for $X$ is the incenter of triangle $B C I$, so $I X$ bisects $\angle B I C$ ) we have $\angle X I C=$ $\angle B I X=\frac{1}{2} \angle B I C=45^{\circ}+\alpha$ and with similar aguments $\angle C I Y=\angle Y I A=45^{\circ}+\beta$ and $\angle A I Z=\angle Z I B=45^{\circ}+\gamma$. Furthermore, we have $\angle X I Y=\angle X I C+\angle C I Y=\left(45^{\circ}+\alpha\right)+$ $\left(45^{\circ}+\beta\right)=135^{\circ}-\gamma, \angle Y I Z=135^{\circ}-\alpha$, and $\angle Z I X=135^{\circ}-\beta$. Now we calculate the lengths of $I X, I Y$ and $I Z$ in terms of $\alpha, \beta$ and $\gamma$. The perpendicular from $I$ on $C X$ has length $I X \cdot \sin \angle C X I=I X \cdot \sin \left(90^{\circ}+\beta\right)=I X \cdot \cos \beta$. But $C I$ bisects $\angle Y C X$, so the perpendicular from $I$ on $C Y$ has the same length, and we conclude  $$ I X \cdot \cos \beta=I Y \cdot \cos \alpha $$  To make calculations easier we choose a length unit that makes $I X=\cos \alpha$. Then $I Y=\cos \beta$ and with similar arguments $I Z=\cos \gamma$. Since $X Y Z$ is equilateral we have $Z X=Z Y$. The law of Cosines in triangles $X Y I, Y Z I$ yields  $$ \begin{aligned} & Z X^{2}=Z Y^{2} \\ \Longrightarrow & I Z^{2}+I X^{2}-2 \cdot I Z \cdot I X \cdot \cos \angle Z I X=I Z^{2}+I Y^{2}-2 \cdot I Z \cdot I Y \cdot \cos \angle Y I Z \\ \Longrightarrow & I X^{2}-I Y^{2}=2 \cdot I Z \cdot(I X \cdot \cos \angle Z I X-I Y \cdot \cos \angle Y I Z) \\ \Longrightarrow & \underbrace{\cos ^{2} \alpha-\cos ^{2} \beta}_{\text {L.H.S. }}=\underbrace{2 \cdot \cos \gamma \cdot\left(\cos \alpha \cdot \cos \left(135^{\circ}-\beta\right)-\cos \beta \cdot \cos \left(135^{\circ}-\alpha\right)\right)}_{\text {R.H.S. }} . \end{aligned} $$  A transformation of the left-hand side (L.H.S.) yields  $$ \begin{aligned} \text { L.H.S. } & =\cos ^{2} \alpha \cdot\left(\sin ^{2} \beta+\cos ^{2} \beta\right)-\cos ^{2} \beta \cdot\left(\sin ^{2} \alpha+\cos ^{2} \alpha\right) \\ & =\cos ^{2} \alpha \cdot \sin ^{2} \beta-\cos ^{2} \beta \cdot \sin ^{2} \alpha \end{aligned} $$  $$ \begin{aligned} & =(\cos \alpha \cdot \sin \beta+\cos \beta \cdot \sin \alpha) \cdot(\cos \alpha \cdot \sin \beta-\cos \beta \cdot \sin \alpha) \\ & =\sin (\beta+\alpha) \cdot \sin (\beta-\alpha)=\sin \left(45^{\circ}-\gamma\right) \cdot \sin (\beta-\alpha) \end{aligned} $$  whereas a transformation of the right-hand side (R.H.S.) leads to  $$ \begin{aligned} \text { R.H.S. } & =2 \cdot \cos \gamma \cdot\left(\cos \alpha \cdot\left(-\cos \left(45^{\circ}+\beta\right)\right)-\cos \beta \cdot\left(-\cos \left(45^{\circ}+\alpha\right)\right)\right) \\ & =2 \cdot \frac{\sqrt{2}}{2} \cdot \cos \gamma \cdot(\cos \alpha \cdot(\sin \beta-\cos \beta)+\cos \beta \cdot(\cos \alpha-\sin \alpha)) \\ & =\sqrt{2} \cdot \cos \gamma \cdot(\cos \alpha \cdot \sin \beta-\cos \beta \cdot \sin \alpha) \\ & =\sqrt{2} \cdot \cos \gamma \cdot \sin (\beta-\alpha) \end{aligned} $$  Equating L.H.S. and R.H.S. we obtain  $$ \begin{aligned} & \sin \left(45^{\circ}-\gamma\right) \cdot \sin (\beta-\alpha)=\sqrt{2} \cdot \cos \gamma \cdot \sin (\beta-\alpha) \\ \Longrightarrow & \sin (\beta-\alpha) \cdot\left(\sqrt{2} \cdot \cos \gamma-\sin \left(45^{\circ}-\gamma\right)\right)=0 \\ \Longrightarrow & \alpha=\beta \quad \text { or } \quad \sqrt{2} \cdot \cos \gamma=\sin \left(45^{\circ}-\gamma\right) . \end{aligned} $$  But $\gamma<45^{\circ}$; so $\sqrt{2} \cdot \cos \gamma>\cos \gamma>\cos 45^{\circ}=\sin 45^{\circ}>\sin \left(45^{\circ}-\gamma\right)$. This leaves $\alpha=\beta$. With similar reasoning we have $\alpha=\gamma$, which means triangle $A B C$ must be equilateral.


BGR   Let $A B C D$ be a circumscribed quadrilateral. Let $g$ be a line through $A$ which meets the segment $B C$ in $M$ and the line $C D$ in $N$. Denote by $I_{1}, I_{2}$, and $I_{3}$ the incenters of $\triangle A B M$, $\triangle M N C$, and $\triangle N D A$, respectively. Show that the orthocenter of $\triangle I_{1} I_{2} I_{3}$ lies on $g$.

Solution: Let $k_{1}, k_{2}$ and $k_{3}$ be the incircles of triangles $A B M, M N C$, and $N D A$, respectively (see Figure 1). We shall show that the tangent $h$ from $C$ to $k_{1}$ which is different from $C B$ is also tangent to $k_{3}$. ![](https://cdn.mathpix.com/cropped/2024_11_18_b191c9407e8cb3d672cbg-68.jpg?height=926&width=1063&top_left_y=842&top_left_x=499)  Figure 1 To this end, let $X$ denote the point of intersection of $g$ and $h$. Then $A B C X$ and $A B C D$ are circumscribed quadrilaterals, whence  $$ C D-C X=(A B+C D)-(A B+C X)=(B C+A D)-(B C+A X)=A D-A X $$  i.e.  $$ A X+C D=C X+A D $$  which in turn reveals that the quadrilateral $A X C D$ is also circumscribed. Thus $h$ touches indeed the circle $k_{3}$. Moreover, we find that $\angle I_{3} C I_{1}=\angle I_{3} C X+\angle X C I_{1}=\frac{1}{2}(\angle D C X+\angle X C B)=\frac{1}{2} \angle D C B=$ $\frac{1}{2}\left(180^{\circ}-\angle M C N\right)=180^{\circ}-\angle M I_{2} N=\angle I_{3} I_{2} I_{1}$, from which we conclude that $C, I_{1}, I_{2}, I_{3}$ are concyclic. Let now $L_{1}$ and $L_{3}$ be the reflection points of $C$ with respect to the lines $I_{2} I_{3}$ and $I_{1} I_{2}$ respectively. Since $I_{1} I_{2}$ is the angle bisector of $\angle N M C$, it follows that $L_{3}$ lies on $g$. By analogous reasoning, $L_{1}$ lies on $g$. Let $H$ be the orthocenter of $\triangle I_{1} I_{2} I_{3}$. We have $\angle I_{2} L_{3} I_{1}=\angle I_{1} C I_{2}=\angle I_{1} I_{3} I_{2}=180^{\circ}-\angle I_{1} H I_{2}$, which entails that the quadrilateral $I_{2} H I_{1} L_{3}$ is cyclic. Analogously, $I_{3} H L_{1} I_{2}$ is cyclic.  Then, working with oriented angles modulo $180^{\circ}$, we have  $$ \angle L_{3} H I_{2}=\angle L_{3} I_{1} I_{2}=\angle I_{2} I_{1} C=\angle I_{2} I_{3} C=\angle L_{1} I_{3} I_{2}=\angle L_{1} H I_{2}, $$  whence $L_{1}, L_{3}$, and $H$ are collinear. By $L_{1} \neq L_{3}$, the claim follows.  Comment. The last part of the argument essentially reproves the following fact: The Simson line of a point $P$ lying on the circumcircle of a triangle $A B C$ with respect to that triangle bisects the line segment connecting $P$ with the orthocenter of $A B C$.


Solution: We start by proving that $C, I_{1}, I_{2}$, and $I_{3}$ are concyclic. ![](https://cdn.mathpix.com/cropped/2024_11_18_b191c9407e8cb3d672cbg-69.jpg?height=797&width=1015&top_left_y=818&top_left_x=526)  Figure 2 To this end, notice first that $I_{2}, M, I_{1}$ are collinear, as are $N, I_{2}, I_{3}$ (see Figure 2). Denote by $\alpha, \beta, \gamma, \delta$ the internal angles of $A B C D$. By considerations in triangle $C M N$, it follows that $\angle I_{3} I_{2} I_{1}=\frac{\gamma}{2}$. We will show that $\angle I_{3} C I_{1}=\frac{\gamma}{2}$, too. Denote by $I$ the incenter of $A B C D$. Clearly, $I_{1} \in B I, I_{3} \in D I, \angle I_{1} A I_{3}=\frac{\alpha}{2}$. Using the abbreviation $[X, Y Z]$ for the distance from point $X$ to the line $Y Z$, we have because of $\angle B A I_{1}=\angle I A I_{3}$ and $\angle I_{1} A I=\angle I_{3} A D$ that  $$ \frac{\left[I_{1}, A B\right]}{\left[I_{1}, A I\right]}=\frac{\left[I_{3}, A I\right]}{\left[I_{3}, A D\right]} $$  Furthermore, consideration of the angle sums in $A I B, B I C, C I D$ and $D I A$ implies $\angle A I B+$ $\angle C I D=\angle B I C+\angle D I A=180^{\circ}$, from which we see  $$ \frac{\left[I_{1}, A I\right]}{\left[I_{3}, C I\right]}=\frac{I_{1} I}{I_{3} I}=\frac{\left[I_{1}, C I\right]}{\left[I_{3}, A I\right]} . $$  Because of $\left[I_{1}, A B\right]=\left[I_{1}, B C\right],\left[I_{3}, A D\right]=\left[I_{3}, C D\right]$, multiplication yields  $$ \frac{\left[I_{1}, B C\right]}{\left[I_{3}, C I\right]}=\frac{\left[I_{1}, C I\right]}{\left[I_{3}, C D\right]} . $$  By $\angle D C I=\angle I C B=\gamma / 2$ it follows that $\angle I_{1} C B=\angle I_{3} C I$ which concludes the proof of the above statement. Let the perpendicular from $I_{1}$ on $I_{2} I_{3}$ intersect $g$ at $Z$. Then $\angle M I_{1} Z=90^{\circ}-\angle I_{3} I_{2} I_{1}=$ $90^{\circ}-\gamma / 2=\angle M C I_{2}$. Since we have also $\angle Z M I_{1}=\angle I_{2} M C$, triangles $M Z I_{1}$ and $M I_{2} C$ are similar. From this one easily proves that also $M I_{2} Z$ and $M C I_{1}$ are similar. Because $C, I_{1}, I_{2}$, and $I_{3}$ are concyclic, $\angle M Z I_{2}=\angle M I_{1} C=\angle N I_{3} C$, thus $N I_{2} Z$ and $N C I_{3}$ are similar, hence $N C I_{2}$ and $N I_{3} Z$ are similar. We conclude $\angle Z I_{3} I_{2}=\angle I_{2} C N=90^{\circ}-\gamma / 2$, hence $I_{1} I_{2} \perp Z I_{3}$. This completes the proof.


AUS   A social club has $n$ members. They have the membership numbers $1,2, \ldots, n$, respectively. From time to time members send presents to other members, including items they have already received as presents from other members. In order to avoid the embarrassing situation that a member might receive a present that he or she has sent to other members, the club adds the following rule to its statutes at one of its annual general meetings: "A member with membership number $a$ is permitted to send a present to a member with membership number $b$ if and only if $a(b-1)$ is a multiple of $n$." Prove that, if each member follows this rule, none will receive a present from another member that he or she has already sent to other members.  Alternative formulation: Let $G$ be a directed graph with $n$ vertices $v_{1}, v_{2}, \ldots, v_{n}$, such that there is an edge going from $v_{a}$ to $v_{b}$ if and only if $a$ and $b$ are distinct and $a(b-1)$ is a multiple of $n$. Prove that this graph does not contain a directed cycle.

Solution: Suppose there is an edge from $v_{i}$ to $v_{j}$. Then $i(j-1)=i j-i=k n$ for some integer $k$, which implies $i=i j-k n$. If $\operatorname{gcd}(i, n)=d$ and $\operatorname{gcd}(j, n)=e$, then $e$ divides $i j-k n=i$ and thus $e$ also divides $d$. Hence, if there is an edge from $v_{i}$ to $v_{j}$, then $\operatorname{gcd}(j, n) \mid \operatorname{gcd}(i, n)$. If there is a cycle in $G$, say $v_{i_{1}} \rightarrow v_{i_{2}} \rightarrow \cdots \rightarrow v_{i_{r}} \rightarrow v_{i_{1}}$, then we have  $$ \operatorname{gcd}\left(i_{1}, n\right)\left|\operatorname{gcd}\left(i_{r}, n\right)\right| \operatorname{gcd}\left(i_{r-1}, n\right)|\ldots| \operatorname{gcd}\left(i_{2}, n\right) \mid \operatorname{gcd}\left(i_{1}, n\right) $$  which implies that all these greatest common divisors must be equal, say be equal to $t$. Now we pick any of the $i_{k}$, without loss of generality let it be $i_{1}$. Then $i_{r}\left(i_{1}-1\right)$ is a multiple of $n$ and hence also (by dividing by $t$ ), $i_{1}-1$ is a multiple of $\frac{n}{t}$. Since $i_{1}$ and $i_{1}-1$ are relatively prime, also $t$ and $\frac{n}{t}$ are relatively prime. So, by the Chinese remainder theorem, the value of $i_{1}$ is uniquely determined modulo $n=t \cdot \frac{n}{t}$ by the value of $t$. But, as $i_{1}$ was chosen arbitrarily among the $i_{k}$, this implies that all the $i_{k}$ have to be equal, a contradiction.


Solution: If $a, b, c$ are integers such that $a b-a$ and $b c-b$ are multiples of $n$, then also $a c-a=a(b c-b)+(a b-a)-(a b-a) c$ is a multiple of $n$. This implies that if there is an edge from $v_{a}$ to $v_{b}$ and an edge from $v_{b}$ to $v_{c}$, then there also must be an edge from $v_{a}$ to $v_{c}$. Therefore, if there are any cycles at all, the smallest cycle must have length 2. But suppose the vertices $v_{a}$ and $v_{b}$ form such a cycle, i. e., $a b-a$ and $a b-b$ are both multiples of $n$. Then $a-b$ is also a multiple of $n$, which can only happen if $a=b$, which is impossible.


Solution: Suppose there was a cycle $v_{i_{1}} \rightarrow v_{i_{2}} \rightarrow \cdots \rightarrow v_{i_{r}} \rightarrow v_{i_{1}}$. Then $i_{1}\left(i_{2}-1\right)$ is a multiple of $n$, i.e., $i_{1} \equiv i_{1} i_{2} \bmod n$. Continuing in this manner, we get $i_{1} \equiv i_{1} i_{2} \equiv$ $i_{1} i_{2} i_{3} \equiv i_{1} i_{2} i_{3} \ldots i_{r} \bmod n$. But the same holds for all $i_{k}$, i. e., $i_{k} \equiv i_{1} i_{2} i_{3} \ldots i_{r} \bmod n$. Hence $i_{1} \equiv i_{2} \equiv \cdots \equiv i_{r} \bmod n$, which means $i_{1}=i_{2}=\cdots=i_{r}$, a contradiction.


Solution: Let $n=k$ be the smallest value of $n$ for which the corresponding graph has a cycle. We show that $k$ is a prime power. If $k$ is not a prime power, it can be written as a product $k=d e$ of relatively prime integers greater than 1. Reducing all the numbers modulo $d$ yields a single vertex or a cycle in the corresponding graph on $d$ vertices, because if $a(b-1) \equiv 0 \bmod k$ then this equation also holds modulo $d$. But since the graph on $d$ vertices has no cycles, by the minimality of $k$, we must have that all the indices of the cycle are congruent modulo $d$. The same holds modulo $e$ and hence also modulo $k=d e$. But then all the indices are equal, which is a contradiction. Thus $k$ must be a prime power $k=p^{m}$. There are no edges ending at $v_{k}$, so $v_{k}$ is not contained in any cycle. All edges not starting at $v_{k}$ end at a vertex belonging to a non-multiple of $p$, and all edges starting at a non-multiple of $p$ must end at $v_{1}$. But there is no edge starting at $v_{1}$. Hence there is no cycle.


Solution: Suppose there was a cycle $v_{i_{1}} \rightarrow v_{i_{2}} \rightarrow \cdots \rightarrow v_{i_{r}} \rightarrow v_{i_{1}}$. Let $q=p^{m}$ be a prime power dividing $n$. We claim that either $i_{1} \equiv i_{2} \equiv \cdots \equiv i_{r} \equiv 0 \bmod q$ or $i_{1} \equiv i_{2} \equiv \cdots \equiv i_{r} \equiv$ $1 \bmod q$. Suppose that there is an $i_{s}$ not divisible by $q$. Then, as $i_{s}\left(i_{s+1}-1\right)$ is a multiple of $q, i_{s+1} \equiv$ $1 \bmod p$. Similarly, we conclude $i_{s+2} \equiv 1 \bmod p$ and so on. So none of the labels is divisible by $p$, but since $i_{s}\left(i_{s+1}-1\right)$ is a multiple of $q=p^{m}$ for all $s$, all $i_{s+1}$ are congruent to 1 modulo $q$. This proves the claim. Now, as all the labels are congruent modulo all the prime powers dividing $n$, they must all be equal by the Chinese remainder theorem. This is a contradiction.


PER   A positive integer $N$ is called balanced, if $N=1$ or if $N$ can be written as a product of an even number of not necessarily distinct primes. Given positive integers $a$ and $b$, consider the polynomial $P$ defined by $P(x)=(x+a)(x+b)$. (a) Prove that there exist distinct positive integers $a$ and $b$ such that all the numbers $P(1), P(2)$, $\ldots, P(50)$ are balanced. (b) Prove that if $P(n)$ is balanced for all positive integers $n$, then $a=b$.

Solution: Define a function $f$ on the set of positive integers by $f(n)=0$ if $n$ is balanced and $f(n)=1$ otherwise. Clearly, $f(n m) \equiv f(n)+f(m) \bmod 2$ for all positive integers $n, m$. (a) Now for each positive integer $n$ consider the binary sequence $(f(n+1), f(n+2), \ldots, f(n+$ $50)$ ). As there are only $2^{50}$ different such sequences there are two different positive integers $a$ and $b$ such that  $$ (f(a+1), f(a+2), \ldots, f(a+50))=(f(b+1), f(b+2), \ldots, f(b+50)) $$  But this implies that for the polynomial $P(x)=(x+a)(x+b)$ all the numbers $P(1), P(2)$, $\ldots, P(50)$ are balanced, since for all $1 \leq k \leq 50$ we have $f(P(k)) \equiv f(a+k)+f(b+k) \equiv$ $2 f(a+k) \equiv 0 \bmod 2$. (b) Now suppose $P(n)$ is balanced for all positive integers $n$ and $a<b$. Set $n=k(b-a)-a$ for sufficiently large $k$, such that $n$ is positive. Then $P(n)=k(k+1)(b-a)^{2}$, and this number can only be balanced, if $f(k)=f(k+1)$ holds. Thus, the sequence $f(k)$ must become constant for sufficiently large $k$. But this is not possible, as for every prime $p$ we have $f(p)=1$ and for every square $t^{2}$ we have $f\left(t^{2}\right)=0$. Hence $a=b$.  Comment. Given a positive integer $k$, a computer search for the pairs of positive integers $(a, b)$, for which $P(1), P(2), \ldots, P(k)$ are all balanced yields the following results with minimal sum $a+b$ and $a<b$ :  | $k$ | 3 | 4 | 5 | 10 | 20 | | :--- | :---: | :---: | :---: | :---: | :---: | | $(a, b)$ | $(2,4)$ | $(6,11)$ | $(8,14)$ | $(20,34)$ | $(1751,3121)$ |  Therefore, trying to find $a$ and $b$ in part (a) of the problem cannot be done by elementary calculations.


EST   Let $f$ be a non-constant function from the set of positive integers into the set of positive integers, such that $a-b$ divides $f(a)-f(b)$ for all distinct positive integers $a, b$. Prove that there exist infinitely many primes $p$ such that $p$ divides $f(c)$ for some positive integer $c$.

Solution: Denote by $v_{p}(a)$ the exponent of the prime $p$ in the prime decomposition of $a$. Assume that there are only finitely many primes $p_{1}, p_{2}, \ldots, p_{m}$ that divide some function value produced of $f$. There are infinitely many positive integers $a$ such that $v_{p_{i}}(a)>v_{p_{i}}(f(1))$ for all $i=1,2, \ldots, m$, e.g. $a=\left(p_{1} p_{2} \ldots p_{m}\right)^{\alpha}$ with $\alpha$ sufficiently large. Pick any such $a$. The condition of the problem then yields $a \mid(f(a+1)-f(1))$. Assume $f(a+1) \neq f(1)$. Then we must have $v_{p_{i}}(f(a+1)) \neq$ $v_{p_{i}}(f(1))$ for at least one $i$. This yields $v_{p_{i}}(f(a+1)-f(1))=\min \left\{v_{p_{i}}(f(a+1)), v_{p_{i}}(f(1))\right\} \leq$ $v_{p_{1}}(f(1))<v_{p_{i}}(a)$. But this contradicts the fact that $a \mid(f(a+1)-f(1))$. Hence we must have $f(a+1)=f(1)$ for all such $a$. Now, for any positive integer $b$ and all such $a$, we have $(a+1-b) \mid(f(a+1)-f(b))$, i.e., $(a+1-b) \mid(f(1)-f(b))$. Since this is true for infinitely many positive integers $a$ we must have $f(b)=f(1)$. Hence $f$ is a constant function, a contradiction. Therefore, our initial assumption was false and there are indeed infinitely many primes $p$ dividing $f(c)$ for some positive integer c.


Solution: Assume that there are only finitely many primes $p_{1}, p_{2}, \ldots, p_{m}$ that divide some function value of $f$. Since $f$ is not identically 1 , we must have $m \geq 1$. Then there exist non-negative integers $\alpha_{1}, \ldots, \alpha_{m}$ such that  $$ f(1)=p_{1}^{\alpha_{1}} p_{2}^{\alpha_{2}} \ldots p_{m}^{\alpha_{m}} $$  We can pick a positive integer $r$ such that $f(r) \neq f(1)$. Let  $$ M=1+p_{1}^{\alpha_{1}+1} p_{2}^{\alpha_{2}+1} \ldots p_{m}^{\alpha_{m}+1} \cdot(f(r)+r) $$  Then for all $i \in\{1, \ldots, m\}$ we have that $p_{i}^{\alpha_{i}+1}$ divides $M-1$ and hence by the condition of the problem also $f(M)-f(1)$. This implies that $f(M)$ is divisible by $p_{i}^{\alpha_{i}}$ but not by $p_{i}^{\alpha_{i}+1}$ for all $i$ and therefore $f(M)=f(1)$. Hence  $$ \begin{aligned} M-r & >p_{1}^{\alpha_{1}+1} p_{2}^{\alpha_{2}+1} \ldots p_{m}^{\alpha_{m}+1} \cdot(f(r)+r)-r \\ & \geq p_{1}^{\alpha_{1}+1} p_{2}^{\alpha_{2}+1} \ldots p_{m}^{\alpha_{m}+1}+(f(r)+r)-r \\ & >p_{1}^{\alpha_{1}} p_{2}^{\alpha_{2}} \ldots p_{m}^{\alpha_{m}}+f(r) \\ & \geq|f(M)-f(r)| . \end{aligned} $$  But since $M-r$ divides $f(M)-f(r)$ this can only be true if $f(r)=f(M)=f(1)$, which contradicts the choice of $r$.  Comment. In the case that $f$ is a polynomial with integer coefficients the result is well-known, see e.g. W. Schwarz, Einführung in die Methoden der Primzahltheorie, 1969.


PRK   Find all positive integers $n$ such that there exists a sequence of positive integers $a_{1}, a_{2}, \ldots, a_{n}$ satisfying  $$ a_{k+1}=\frac{a_{k}^{2}+1}{a_{k-1}+1}-1 $$  for every $k$ with $2 \leq k \leq n-1$.

Solution: Such a sequence exists for $n=1,2,3,4$ and no other $n$. Since the existence of such a sequence for some $n$ implies the existence of such a sequence for all smaller $n$, it suffices to prove that $n=5$ is not possible and $n=4$ is possible. Assume first that for $n=5$ there exists a sequence of positive integers $a_{1}, a_{2}, \ldots, a_{5}$ satisfying the conditions  $$ \begin{aligned} & a_{2}^{2}+1=\left(a_{1}+1\right)\left(a_{3}+1\right), \\ & a_{3}^{2}+1=\left(a_{2}+1\right)\left(a_{4}+1\right), \\ & a_{4}^{2}+1=\left(a_{3}+1\right)\left(a_{5}+1\right) . \end{aligned} $$  Assume $a_{1}$ is odd, then $a_{2}$ has to be odd as well and as then $a_{2}^{2}+1 \equiv 2 \bmod 4, a_{3}$ has to be even. But this is a contradiction, since then the even number $a_{2}+1$ cannot divide the odd number $a_{3}^{2}+1$. Hence $a_{1}$ is even. If $a_{2}$ is odd, $a_{3}^{2}+1$ is even (as a multiple of $a_{2}+1$ ) and hence $a_{3}$ is odd, too. Similarly we must have $a_{4}$ odd as well. But then $a_{3}^{2}+1$ is a product of two even numbers $\left(a_{2}+1\right)\left(a_{4}+1\right)$ and thus is divisible by 4 , which is a contradiction as for odd $a_{3}$ we have $a_{3}^{2}+1 \equiv 2 \bmod 4$. Hence $a_{2}$ is even. Furthermore $a_{3}+1$ divides the odd number $a_{2}^{2}+1$ and so $a_{3}$ is even. Similarly, $a_{4}$ and $a_{5}$ are even as well. Now set $x=a_{2}$ and $y=a_{3}$. From the given condition we get $(x+1) \mid\left(y^{2}+1\right)$ and $(y+1) \mid\left(x^{2}+1\right)$. We will prove that there is no pair of positive even numbers $(x, y)$ satisfying these two conditions, thus yielding a contradiction to the assumption. Assume there exists a pair $\left(x_{0}, y_{0}\right)$ of positive even numbers satisfying the two conditions $\left(x_{0}+1\right) \mid\left(y_{0}^{2}+1\right)$ and $\left(y_{0}+1\right) \mid\left(x_{0}^{2}+1\right)$. Then one has $\left(x_{0}+1\right) \mid\left(y_{0}^{2}+1+x_{0}^{2}-1\right)$, i.e., $\left(x_{0}+1\right) \mid\left(x_{0}^{2}+y_{0}^{2}\right)$, and similarly $\left(y_{0}+1\right) \mid\left(x_{0}^{2}+y_{0}^{2}\right)$. Any common divisor $d$ of $x_{0}+1$ and $y_{0}+1$ must hence also divide the number $\left(x_{0}^{2}+1\right)+\left(y_{0}^{2}+1\right)-\left(x_{0}^{2}+y_{0}^{2}\right)=2$. But as $x_{0}+1$ and $y_{0}+1$ are both odd, we must have $d=1$. Thus $x_{0}+1$ and $y_{0}+1$ are relatively prime and therefore there exists a positive integer $k$ such that  $$ k(x+1)(y+1)=x^{2}+y^{2} $$  has the solution $\left(x_{0}, y_{0}\right)$. We will show that the latter equation has no solution $(x, y)$ in positive even numbers.  Assume there is a solution. Pick the solution $\left(x_{1}, y_{1}\right)$ with the smallest sum $x_{1}+y_{1}$ and assume $x_{1} \geq y_{1}$. Then $x_{1}$ is a solution to the quadratic equation  $$ x^{2}-k\left(y_{1}+1\right) x+y_{1}^{2}-k\left(y_{1}+1\right)=0 . $$  Let $x_{2}$ be the second solution, which by Vieta's theorem fulfills $x_{1}+x_{2}=k\left(y_{1}+1\right)$ and $x_{1} x_{2}=y_{1}^{2}-k\left(y_{1}+1\right)$. If $x_{2}=0$, the second equation implies $y_{1}^{2}=k\left(y_{1}+1\right)$, which is impossible, as $y_{1}+1>1$ cannot divide the relatively prime number $y_{1}^{2}$. Therefore $x_{2} \neq 0$. Also we get $\left(x_{1}+1\right)\left(x_{2}+1\right)=x_{1} x_{2}+x_{1}+x_{2}+1=y_{1}^{2}+1$ which is odd, and hence $x_{2}$ must be even and positive. Also we have $x_{2}+1=\frac{y_{1}^{2}+1}{x_{1}+1} \leq \frac{y_{1}^{2}+1}{y_{1}+1} \leq y_{1} \leq x_{1}$. But this means that the pair $\left(x^{\prime}, y^{\prime}\right)$ with $x^{\prime}=y_{1}$ and $y^{\prime}=x_{2}$ is another solution of $k(x+1)(y+1)=x^{2}+y^{2}$ in even positive numbers with $x^{\prime}+y^{\prime}<x_{1}+y_{1}$, a contradiction. Therefore we must have $n \leq 4$. When $n=4$, a possible example of a sequence is $a_{1}=4, a_{2}=33, a_{3}=217$ and $a_{4}=1384$.


Solution: It is easy to check that for $n=4$ the sequence $a_{1}=4, a_{2}=33, a_{3}=217$ and $a_{4}=1384$ is possible. Now assume there is a sequence with $n \geq 5$. Then we have in particular  $$ \begin{aligned} & a_{2}^{2}+1=\left(a_{1}+1\right)\left(a_{3}+1\right), \\ & a_{3}^{2}+1=\left(a_{2}+1\right)\left(a_{4}+1\right), \\ & a_{4}^{2}+1=\left(a_{3}+1\right)\left(a_{5}+1\right) . \end{aligned} $$  Also assume without loss of generality that among all such quintuples $\left(a_{1}, a_{2}, a_{3}, a_{4}, a_{5}\right)$ we have chosen one with minimal $a_{1}$. One shows quickly the following fact: If three positive integers $x, y, z$ fulfill $y^{2}+1=(x+1)(z+1)$ and if $y$ is even, then $x$ and $z$ are even as well and either $x<y<z$ or $z<y<x$ holds. Indeed, the first part is obvious and from $x<y$ we conclude  $$ z+1=\frac{y^{2}+1}{x+1} \geq \frac{y^{2}+1}{y}>y $$  and similarly in the other case. Now, if $a_{3}$ was odd, then $\left(a_{2}+1\right)\left(a_{4}+1\right)=a_{3}^{2}+1 \equiv 2 \bmod 4$ would imply that one of $a_{2}$ or $a_{4}$ is even, this contradicts (1). Thus $a_{3}$ and hence also $a_{1}, a_{2}, a_{4}$ and $a_{5}$ are even. According to (1), one has $a_{1}<a_{2}<a_{3}<a_{4}<a_{5}$ or $a_{1}>a_{2}>a_{3}>a_{4}>a_{5}$ but due to the minimality of $a_{1}$ the first series of inequalities must hold. Consider the identity $\left(a_{3}+1\right)\left(a_{1}+a_{3}\right)=a_{3}^{2}-1+\left(a_{1}+1\right)\left(a_{3}+1\right)=a_{2}^{2}+a_{3}^{2}=a_{2}^{2}-1+\left(a_{2}+1\right)\left(a_{4}+1\right)=\left(a_{2}+1\right)\left(a_{2}+a_{4}\right)$. Any common divisor of the two odd numbers $a_{2}+1$ and $a_{3}+1$ must also divide $\left(a_{2}+1\right)\left(a_{4}+\right.$ $1)-\left(a_{3}+1\right)\left(a_{3}-1\right)=2$, so these numbers are relatively prime. Hence the last identity shows that $a_{1}+a_{3}$ must be a multiple of $a_{2}+1$, i.e. there is an integer $k$ such that  $$ a_{1}+a_{3}=k\left(a_{2}+1\right) $$  Now set $a_{0}=k\left(a_{1}+1\right)-a_{2}$. This is an integer and we have  $$ \begin{aligned} \left(a_{0}+1\right)\left(a_{2}+1\right) & =k\left(a_{1}+1\right)\left(a_{2}+1\right)-\left(a_{2}-1\right)\left(a_{2}+1\right) \\ & =\left(a_{1}+1\right)\left(a_{1}+a_{3}\right)-\left(a_{1}+1\right)\left(a_{3}+1\right)+2 \\ & =\left(a_{1}+1\right)\left(a_{1}-1\right)+2=a_{1}^{2}+1 \end{aligned} $$  Thus $a_{0} \geq 0$. If $a_{0}>0$, then by (1) we would have $a_{0}<a_{1}<a_{2}$ and then the quintuple $\left(a_{0}, a_{1}, a_{2}, a_{3}, a_{4}\right)$ would contradict the minimality of $a_{1}$. Hence $a_{0}=0$, implying $a_{2}=a_{1}^{2}$. But also $a_{2}=k\left(a_{1}+1\right)$, which finally contradicts the fact that $a_{1}+1>1$ is relatively prime to $a_{1}^{2}$ and thus cannot be a divisior of this number. Hence $n \geq 5$ is not possible.  Comment 1. Finding the example for $n=4$ is not trivial and requires a tedious calculation, but it can be reduced to checking a few cases. The equations $\left(a_{1}+1\right)\left(a_{3}+1\right)=a_{2}^{2}+1$ and $\left(a_{2}+1\right)\left(a_{4}+1\right)=a_{3}^{2}+1$ imply, as seen in the proof, that $a_{1}$ is even and $a_{2}, a_{3}, a_{4}$ are odd. The case $a_{1}=2$ yields $a_{2}^{2} \equiv-1 \bmod 3$ which is impossible. Hence $a_{1}=4$ is the smallest possibility. In this case $a_{2}^{2} \equiv-1 \bmod 5$ and $a_{2}$ is odd, which implies $a_{2} \equiv 3$ or $a_{2} \equiv 7 \bmod 10$. Hence we have to start checking $a_{2}=7,13,17,23,27,33$ and in the last case we succeed.  Comment 2. The choice of $a_{0}=k\left(a_{1}+1\right)-a_{2}$ in the second solution appears more natural if one considers that by the previous calculations one has $a_{1}=k\left(a_{2}+1\right)-a_{3}$ and $a_{2}=k\left(a_{3}+1\right)-a_{4}$. Alternatively, one can solve the equation (2) for $a_{3}$ and use $a_{2}^{2}+1=\left(a_{1}+1\right)\left(a_{3}+1\right)$ to get $a_{2}^{2}-k\left(a_{1}+1\right) a_{2}+a_{1}^{2}-k\left(a_{1}+1\right)=0$. Now $a_{0}$ is the second solution to this quadratic equation in $a_{2}$ (Vieta jumping).


HUN   Let $P(x)$ be a non-constant polynomial with integer coefficients. Prove that there is no function $T$ from the set of integers into the set of integers such that the number of integers $x$ with $T^{n}(x)=x$ is equal to $P(n)$ for every $n \geq 1$, where $T^{n}$ denotes the $n$-fold application of $T$.

Solution: Assume there is a polynomial $P$ of degree at least 1 with the desired property for a given function $T$. Let $A(n)$ denote the set of all $x \in \mathbb{Z}$ such that $T^{n}(x)=x$ and let $B(n)$ denote the set of all $x \in \mathbb{Z}$ for which $T^{n}(x)=x$ and $T^{k}(x) \neq x$ for all $1 \leq k<n$. Both sets are finite under the assumption made. For each $x \in A(n)$ there is a smallest $k \geq 1$ such that $T^{k}(x)=x$, i.e., $x \in B(k)$. Let $d=\operatorname{gcd}(k, n)$. There are positive integers $r, s$ such that $r k-s n=d$ and hence $x=T^{r k}(x)=T^{s n+d}(x)=T^{d}\left(T^{s n}(x)\right)=T^{d}(x)$. The minimality of $k$ implies $d=k$, i.e., $k \mid n$. On the other hand one clearly has $B(k) \subset A(n)$ if $k \mid n$ and thus we have $A(n)=\bigcup_{d \mid n} B(d)$ as a disjoint union and hence  $$ |A(n)|=\sum_{d \mid n}|B(d)| $$  Furthermore, for every $x \in B(n)$ the elements $x, T^{1}(x), T^{2}(x), \ldots, T^{n-1}(x)$ are $n$ distinct elements of $B(n)$. The fact that they are in $A(n)$ is obvious. If for some $k<n$ and some $0 \leq i<n$ we had $T^{k}\left(T^{i}(x)\right)=T^{i}(x)$, i.e. $\quad T^{k+i}(x)=T^{i}(x)$, that would imply $x=T^{n}(x)=T^{n-i}\left(T^{i}(x)\right)=T^{n-i}\left(T^{k+i}(x)\right)=T^{k}\left(T^{n}(x)\right)=T^{k}(x)$ contradicting the minimality of $n$. Thus $T^{i}(x) \in B(n)$ and $T^{i}(x) \neq T^{j}(x)$ for $0 \leq i<j \leq n-1$. So indeed, $T$ permutes the elements of $B(n)$ in (disjoint) cycles of length $n$ and in particular one has $n||B(n)|$. Now let $P(x)=\sum_{i=0}^{k} a_{i} x^{i}, a_{i} \in \mathbb{Z}, k \geq 1, a_{k} \neq 0$ and suppose that $|A(n)|=P(n)$ for all $n \geq 1$. Let $p$ be any prime. Then  $$ p^{2}| | B\left(p^{2}\right)\left|=\left|A\left(p^{2}\right)\right|-|A(p)|=a_{1}\left(p^{2}-p\right)+a_{2}\left(p^{4}-p^{2}\right)+\ldots\right. $$  Hence $p \mid a_{1}$ and since this is true for all primes we must have $a_{1}=0$. Now consider any two different primes $p$ and $q$. Since $a_{1}=0$ we have that  $$ \left|A\left(p^{2} q\right)\right|-|A(p q)|=a_{2}\left(p^{4} q^{2}-p^{2} q^{2}\right)+a_{3}\left(p^{6} q^{3}-p^{3} q^{3}\right)+\ldots $$  is a multiple of $p^{2} q$. But we also have  $$ p^{2} q| | B\left(p^{2} q\right)\left|=\left|A\left(p^{2} q\right)\right|-|A(p q)|-\left|B\left(p^{2}\right)\right|\right. $$  This implies  $$ p^{2} q| | B\left(p^{2}\right)\left|=\left|A\left(p^{2}\right)\right|-|A(p)|=a_{2}\left(p^{4}-p^{2}\right)+a_{3}\left(p^{6}-p^{3}\right)+\cdots+a_{k}\left(p^{2 k}-p^{k}\right)\right. $$  Since this is true for every prime $q$ we must have $a_{2}\left(p^{4}-p^{2}\right)+a_{3}\left(p^{6}-p^{3}\right)+\cdots+a_{k}\left(p^{2 k}-p^{k}\right)=0$ for every prime $p$. Since this expression is a polynomial in $p$ of degree $2 k$ (because $a_{k} \neq 0$ ) this is a contradiction, as such a polynomial can have at most $2 k$ zeros.  Comment. The last contradiction can also be reached via  $$ a_{k}=\lim _{p \rightarrow \infty} \frac{1}{p^{2 k}}\left(a_{2}\left(p^{4}-p^{2}\right)+a_{3}\left(p^{6}-p^{3}\right)+\cdots+a_{k}\left(p^{2 k}-p^{k}\right)\right)=0 . $$


Solution: As in the first solution define $A(n)$ and $B(n)$ and assume that a polynomial $P$ with the required property exists. This again implies that $|A(n)|$ and $|B(n)|$ is finite for all positive integers $n$ and that  $$ P(n)=|A(n)|=\sum_{d \mid n}|B(d)| \quad \text { and } \quad n||B(n)| . $$  Now, for any two distinct primes $p$ and $q$, we have  $$ P(0) \equiv P(p q) \equiv|B(1)|+|B(p)|+|B(q)|+|B(p q)| \equiv|B(1)|+|B(p)| \quad \bmod q $$  Thus, for any fixed $p$, the expression $P(0)-|B(1)|-|B(p)|$ is divisible by arbitrarily large primes $q$ which means that $P(0)=|B(1)|+|B(p)|=P(p)$ for any prime $p$. This implies that the polynomial $P$ is constant, a contradiction.


TUR   Let $k$ be a positive integer. Show that if there exists a sequence $a_{0}, a_{1}, \ldots$ of integers satisfying the condition  $$ a_{n}=\frac{a_{n-1}+n^{k}}{n} \quad \text { for all } n \geq 1 $$  then $k-2$ is divisible by 3 .

Solution: Part $A$. For each positive integer $k$, there exists a polynomial $P_{k}$ of degree $k-1$ with integer coefficients, i. e., $P_{k} \in \mathbb{Z}[x]$, and an integer $q_{k}$ such that the polynomial identity  $$ x P_{k}(x)=x^{k}+P_{k}(x-1)+q_{k} $$  is satisfied. To prove this, for fixed $k$ we write  $$ P_{k}(x)=b_{k-1} x^{k-1}+\cdots+b_{1} x+b_{0} $$  and determine the coefficients $b_{k-1}, b_{k-2}, \ldots, b_{0}$ and the number $q_{k}$ successively. Obviously, we have $b_{k-1}=1$. For $m=k-1, k-2, \ldots, 1$, comparing the coefficients of $x^{m}$ in the identity $\left(I_{k}\right)$ results in an expression of $b_{m-1}$ as an integer linear combination of $b_{k-1}, \ldots, b_{m}$, and finally $q_{k}=-P_{k}(-1)$. Part $B$. Let $k$ be a positive integer, and let $a_{0}, a_{1}, \ldots$ be a sequence of real numbers satisfying the recursion given in the problem. This recursion can be written as  $$ a_{n}-P_{k}(n)=\frac{a_{n-1}-P_{k}(n-1)}{n}-\frac{q_{k}}{n} \quad \text { for all } n \geq 1 $$  which by induction gives  $$ a_{n}-P_{k}(n)=\frac{a_{0}-P_{k}(0)}{n!}-q_{k} \sum_{i=0}^{n-1} \frac{i!}{n!} \text { for all } n \geq 1 $$  Therefore, the numbers $a_{n}$ are integers for all $n \geq 1$ only if  $$ a_{0}=P_{k}(0) \quad \text { and } \quad q_{k}=0 $$  Part $C$. Multiplying the identity $\left(I_{k}\right)$ by $x^{2}+x$ and subtracting the identities $\left(I_{k+1}\right),\left(I_{k+2}\right)$ and $q_{k} x^{2}=q_{k} x^{2}$ therefrom, we obtain  $$ x T_{k}(x)=T_{k}(x-1)+2 x\left(P_{k}(x-1)+q_{k}\right)-\left(q_{k+2}+q_{k+1}+q_{k}\right), $$  where the polynomials $T_{k} \in \mathbb{Z}[x]$ are defined by $T_{k}(x)=\left(x^{2}+x\right) P_{k}(x)-P_{k+1}(x)-P_{k+2}(x)-q_{k} x$. Thus  $$ x T_{k}(x) \equiv T_{k}(x-1)+q_{k+2}+q_{k+1}+q_{k} \bmod 2, \quad k=1,2, \ldots $$  Comparing the degrees, we easily see that this is only possible if $T_{k}$ is the zero polynomial modulo 2 , and  $$ q_{k+2} \equiv q_{k+1}+q_{k} \bmod 2 \quad \text { for } k=1,2, \ldots $$  Since $q_{1}=-1$ and $q_{2}=0$, these congruences finish the proof.


Solution: Part $A$ and $B$. Let $k$ be a positive integer, and suppose there is a sequence $a_{0}, a_{1}, \ldots$ as required. We prove: There exists a polynomial $P \in \mathbb{Z}[x]$, i. e., with integer coefficients, such that $a_{n}=P(n), n=0,1, \ldots$, and $\quad x P(x)=x^{k}+P(x-1)$. To prove this, we write $\quad P(x)=b_{k-1} x^{k-1}+\cdots+b_{1} x+b_{0} \quad$ and determine the coefficients $b_{k-1}, b_{k-2}, \ldots, b_{0}$ successively such that  $$ x P(x)-x^{k}-P(x-1)=q, $$  where $q=q_{k}$ is an integer. Comparing the coefficients of $x^{m}$ results in an expression of $b_{m-1}$ as an integer linear combination of $b_{k-1}, \ldots, b_{m}$. Defining $c_{n}=a_{n}-P(n)$, we get  $$ \begin{aligned} P(n)+c_{n} & =\frac{P(n-1)+c_{n-1}+n^{k}}{n}, \quad \text { i.e., } \\ q+n c_{n} & =c_{n-1}, \end{aligned} $$  hence  $$ c_{n}=\frac{c_{0}}{n!}-q \cdot \frac{0!+1!+\cdots+(n-1)!}{n!} $$  We conclude $\lim _{n \rightarrow \infty} c_{n}=0$, which, using $c_{n} \in \mathbb{Z}$, implies $c_{n}=0$ for sufficiently large $n$. Therefore, we get $q=0$ and $c_{n}=0, n=0,1, \ldots$. Part C. Suppose that $q=q_{k}=0$, i. e. $x P(x)=x^{k}+P(x-1)$. To consider this identity for arguments $x \in \mathbb{F}_{4}$, we write $\mathbb{F}_{4}=\{0,1, \alpha, \alpha+1\}$. Then we get  $$ \begin{aligned} \alpha P_{k}(\alpha) & =\alpha^{k}+P_{k}(\alpha+1) \quad \text { and } \\ (\alpha+1) P_{k}(\alpha+1) & =(\alpha+1)^{k}+P_{k}(\alpha), \end{aligned} $$  hence  $$ \begin{aligned} P_{k}(\alpha) & =1 \cdot P_{k}(\alpha)=(\alpha+1) \alpha P_{k}(\alpha) \\ & =(\alpha+1) P_{k}(\alpha+1)+(\alpha+1) \alpha^{k} \\ & =P_{k}(\alpha)+(\alpha+1)^{k}+(\alpha+1) \alpha^{k} . \end{aligned} $$  Now, $(\alpha+1)^{k-1}=\alpha^{k}$ implies $k \equiv 2 \bmod 3$.  Comment 1. For $k=2$, the sequence given by $a_{n}=n+1, n=0,1, \ldots$, satisfies the conditions of the problem.  Comment 2. The first few polynomials $P_{k}$ and integers $q_{k}$ are  $$ \begin{aligned} & P_{1}(x)=1, \quad q_{1}=-1, \\ & P_{2}(x)=x+1, \quad q_{2}=0, \\ & P_{3}(x)=x^{2}+x-1, \quad q_{3}=1, \\ & P_{4}(x)=x^{3}+x^{2}-2 x-1, \quad q_{4}=-1, \\ & P_{5}(x)=x^{4}+x^{3}-3 x^{2}+5, \quad q_{5}=-2, \\ & P_{6}(x)=x^{5}+x^{4}-4 x^{3}+2 x^{2}+10 x-5, \quad q_{6}=9, \\ & q_{7}=-9, \quad q_{8}=-50, \quad q_{9}=267, \quad q_{10}=-413, \quad q_{11}=-2180 . \end{aligned} $$  A lookup in the On-Line Encyclopedia of Integer Sequences (A000587) reveals that the sequence $q_{1},-q_{2}, q_{3},-q_{4}, q_{5}, \ldots$ is known as Uppuluri-CARPENTER numbers. The result that $q_{k}=0$ implies $k \equiv 2 \bmod 3$ is contained in Murty, Summer: On the $p$-adic series $\sum_{n=0}^{\infty} n^{k} \cdot n$ !. CRM Proc. and Lecture Notes 36, 2004. As shown by Alexander (Non-Vanishing of Uppuluri-Carpenter Numbers, Preprint 2006), Uppuluri-Carpenter numbers are zero at most twice.  Comment 3. The numbers $q_{k}$ can be written in terms of the Stirling numbers of the second kind. To show this, we fix the notation such that  $$ \begin{aligned} x^{k}= & S_{k-1, k-1} x(x-1) \cdots(x-k+1) \\ & +S_{k-1, k-2} x(x-1) \cdots(x-k+2) \\ & +\cdots+S_{k-1,0} x \end{aligned} $$  e.g., $S_{2,2}=1, S_{2,1}=3, S_{2,0}=1$, and we define  $$ \Omega_{k}=S_{k-1, k-1}-S_{k-1, k-2}+-\cdots $$  Replacing $x$ by $-x$ in (*) results in  $$ \begin{aligned} x^{k}= & S_{k-1, k-1} x(x+1) \cdots(x+k-1) \\ & -S_{k-1, k-2} x(x+1) \cdots(x+k-2) \\ & +-\cdots \pm S_{k-1,0} x \end{aligned} $$  Defining  $$ \begin{aligned} P(x)= & S_{k-1, k-1}(x+1) \cdots(x+k-1) \\ & +\left(S_{k-1, k-1}-S_{k-1, k-2}\right)(x+1) \cdots(x+k-2) \\ & +\left(S_{k-1, k-1}-S_{k-1, k-2}+S_{k-1, k-3}\right)(x+1) \cdots(x+k-3) \\ & +\cdots+\Omega_{k} \end{aligned} $$  we obtain  $$ \begin{aligned} x P(x)-P(x-1)= & S_{k-1, k-1} x(x+1) \cdots(x+k-1) \\ & -S_{k-1, k-2} x(x+1) \cdots(x+k-2) \\ & +-\cdots \pm S_{k-1,0} x-\Omega_{k} \\ = & x^{k}-\Omega_{k} \end{aligned} $$  hence $q_{k}=-\Omega_{k}$.


MNG   Let $a$ and $b$ be distinct integers greater than 1 . Prove that there exists a positive integer $n$ such that $\left(a^{n}-1\right)\left(b^{n}-1\right)$ is not a perfect square.

Solution: At first we notice that  $$ \begin{aligned} (1-\alpha)^{\frac{1}{2}}(1-\beta)^{\frac{1}{2}} & =\left(1-\frac{1}{2} \cdot \alpha-\frac{1}{8} \cdot \alpha^{2}-\cdots\right)\left(1-\frac{1}{2} \cdot \beta-\frac{1}{8} \cdot \beta^{2}-\cdots\right) \\ & =\sum_{k, \ell \geq 0} c_{k, \ell} \cdot \alpha^{k} \beta^{\ell} \quad \text { for all } \alpha, \beta \in(0,1) \end{aligned} $$  where $c_{0,0}=1$ and $c_{k, \ell}$ are certain coefficients. For an indirect proof, we suppose that $x_{n}=\sqrt{\left(a^{n}-1\right)\left(b^{n}-1\right)} \in \mathbb{Z}$ for all positive integers $n$. Replacing $a$ by $a^{2}$ and $b$ by $b^{2}$ if necessary, we may assume that $a$ and $b$ are perfect squares, hence $\sqrt{a b}$ is an integer. At first we shall assume that $a^{\mu} \neq b^{\nu}$ for all positive integers $\mu, \nu$. We have  $$ x_{n}=(\sqrt{a b})^{n}\left(1-\frac{1}{a^{n}}\right)^{\frac{1}{2}}\left(1-\frac{1}{b^{n}}\right)^{\frac{1}{2}}=\sum_{k, \ell \geq 0} c_{k, \ell}\left(\frac{\sqrt{a b}}{a^{k} b^{\ell}}\right)^{n} . $$  Choosing $k_{0}$ and $\ell_{0}$ such that $a^{k_{0}}>\sqrt{a b}, b^{\ell_{0}}>\sqrt{a b}$, we define the polynomial  $$ P(x)=\prod_{k=0, \ell=0}^{k_{0}-1, \ell_{0}-1}\left(a^{k} b^{\ell} x-\sqrt{a b}\right)=: \sum_{i=0}^{k_{0} \cdot \ell_{0}} d_{i} x^{i} $$  with integer coefficients $d_{i}$. By our assumption, the zeros  $$ \frac{\sqrt{a b}}{a^{k} b^{\ell}}, \quad k=0, \ldots, k_{0}-1, \quad \ell=0, \ldots, \ell_{0}-1 $$  of $P$ are pairwise distinct. Furthermore, we consider the integer sequence  $$ y_{n}=\sum_{i=0}^{k_{0} \cdot \ell_{0}} d_{i} x_{n+i}, \quad n=1,2, \ldots $$  By the theory of linear recursions, we obtain  $$ y_{n}=\sum_{\substack{k, \ell \geq 0 \\ k \geq k_{0} \text { or } \ell \geq \ell_{0}}} e_{k, \ell}\left(\frac{\sqrt{a b}}{a^{k} b^{\ell}}\right)^{n}, \quad n=1,2, \ldots $$  with real numbers $e_{k, \ell}$. We have  $$ \left|y_{n}\right| \leq \sum_{\substack{k, \ell \geq 0 \\ k \geq k_{0} \text { or } \ell \geq \ell_{0}}}\left|e_{k, \ell}\right|\left(\frac{\sqrt{a b}}{a^{k} b^{\ell}}\right)^{n}=: M_{n} . $$  Because the series in (4) is obtained by a finite linear combination of the absolutely convergent series (1), we conclude that in particular $M_{1}<\infty$. Since  $$ \frac{\sqrt{a b}}{a^{k} b^{\ell}} \leq \lambda:=\max \left\{\frac{\sqrt{a b}}{a^{k_{0}}}, \frac{\sqrt{a b}}{b^{\ell_{0}}}\right\} \quad \text { for all } k, \ell \geq 0 \text { such that } k \geq k_{0} \text { or } \ell \geq \ell_{0} $$  we get the estimates $M_{n+1} \leq \lambda M_{n}, n=1,2, \ldots$ Our choice of $k_{0}$ and $\ell_{0}$ ensures $\lambda<1$, which implies $M_{n} \rightarrow 0$ and consequently $y_{n} \rightarrow 0$ as $n \rightarrow \infty$. It follows that $y_{n}=0$ for all sufficiently large $n$. So, equation (3) reduces to $\sum_{i=0}^{k_{0} \cdot \ell_{0}} d_{i} x_{n+i}=0$. Using the theory of linear recursions again, for sufficiently large $n$ we have  $$ x_{n}=\sum_{k=0, \ell=0}^{k_{0}-1, \ell_{0}-1} f_{k, \ell}\left(\frac{\sqrt{a b}}{a^{k} b^{\ell}}\right)^{n} $$  for certain real numbers $f_{k, \ell}$. Comparing with (2), we see that $f_{k, \ell}=c_{k, \ell}$ for all $k, \ell \geq 0$ with $k<k_{0}, \ell<\ell_{0}$, and $c_{k, \ell}=0$ if $k \geq k_{0}$ or $\ell \geq \ell_{0}$, since we assumed that $a^{\mu} \neq b^{\nu}$ for all positive integers $\mu, \nu$. In view of (1), this means  $$ (1-\alpha)^{\frac{1}{2}}(1-\beta)^{\frac{1}{2}}=\sum_{k=0, \ell=0}^{k_{0}-1, \ell_{0}-1} c_{k, \ell} \cdot \alpha^{k} \beta^{\ell} $$  for all real numbers $\alpha, \beta \in(0,1)$. We choose $k^{*}<k_{0}$ maximal such that there is some $i$ with $c_{k^{*}, i} \neq 0$. Squaring (5) and comparing coefficients of $\alpha^{2 k^{*}} \beta^{2 i^{*}}$, where $i^{*}$ is maximal with $c_{k^{*}, i^{*}} \neq 0$, we see that $k^{*}=0$. This means that the right hand side of (5) is independent of $\alpha$, which is clearly impossible. We are left with the case that $a^{\mu}=b^{\nu}$ for some positive integers $\mu$ and $\nu$. We may assume that $\mu$ and $\nu$ are relatively prime. Then there is some positive integer $c$ such that $a=c^{\nu}$ and $b=c^{\mu}$. Now starting with the expansion (2), i. e.,  $$ x_{n}=\sum_{j \geq 0} g_{j}\left(\frac{\sqrt{c^{\mu+\nu}}}{c^{j}}\right)^{n} $$  for certain coefficients $g_{j}$, and repeating the arguments above, we see that $g_{j}=0$ for sufficiently large $j$, say $j>j_{0}$. But this means that  $$ \left(1-x^{\mu}\right)^{\frac{1}{2}}\left(1-x^{\nu}\right)^{\frac{1}{2}}=\sum_{j=0}^{j_{0}} g_{j} x^{j} $$  for all real numbers $x \in(0,1)$. Squaring, we see that  $$ \left(1-x^{\mu}\right)\left(1-x^{\nu}\right) $$  is the square of a polynomial in $x$. In particular, all its zeros are of order at least 2 , which implies $\mu=\nu$ by looking at roots of unity. So we obtain $\mu=\nu=1$, i. e., $a=b$, a contradiction.


Solution: We set $a^{2}=A, b^{2}=B$, and $z_{n}=\sqrt{\left(A^{n}-1\right)\left(B^{n}-1\right)}$. Let us assume that $z_{n}$ is an integer for $n=1,2, \ldots$. Without loss of generality, we may suppose that $b<a$. We determine an integer $k \geq 2$ such that $b^{k-1} \leq a<b^{k}$, and define a sequence $\gamma_{1}, \gamma_{2}, \ldots$ of rational numbers such that  $$ 2 \gamma_{1}=1 \quad \text { and } \quad 2 \gamma_{n+1}=\sum_{i=1}^{n} \gamma_{i} \gamma_{n-i} \text { for } n=1,2, \ldots $$  It could easily be shown that $\gamma_{n}=\frac{1 \cdot 1 \cdot 3 . .(2 n-3)}{2 \cdot 4 \cdot 6 \cdot \ldots 2 n}$, for instance by reading VANDERMONDEs convolution as an equation between polynomials, but we shall have no use for this fact. Using Landaus $O$-Notation in the usual way, we have  $$ \begin{aligned} & \left\{(a b)^{n}-\gamma_{1}\left(\frac{a}{b}\right)^{n}-\gamma_{2}\left(\frac{a}{b^{3}}\right)^{n}-\cdots-\gamma_{k}\left(\frac{a}{b^{2 k-1}}\right)^{n}+O\left(\frac{b}{a}\right)^{n}\right\}^{2} \\ & =A^{n} B^{n}-2 \gamma_{1} A^{n}-\sum_{i=2}^{k}\left(2 \gamma_{i}-\sum_{j=1}^{i-1} \gamma_{j} \gamma_{i-j}\right)\left(\frac{A}{B^{i-1}}\right)^{n}+O\left(\frac{A}{B^{k}}\right)^{n}+O\left(B^{n}\right) \\ & =A^{n} B^{n}-A^{n}+O\left(B^{n}\right) \end{aligned} $$  whence  $$ z_{n}=(a b)^{n}-\gamma_{1}\left(\frac{a}{b}\right)^{n}-\gamma_{2}\left(\frac{a}{b^{3}}\right)^{n}-\cdots-\gamma_{k}\left(\frac{a}{b^{2 k-1}}\right)^{n}+O\left(\frac{b}{a}\right)^{n} $$  Now choose rational numbers $r_{1}, r_{2}, \ldots, r_{k+1}$ such that  $$ (x-a b) \cdot\left(x-\frac{a}{b}\right) \ldots\left(x-\frac{a}{b^{2 k-1}}\right)=x^{k+1}-r_{1} x^{k}+-\cdots \pm r_{k+1} $$  and then a natural number $M$ for which $M r_{1}, M r_{2}, \ldots M r_{k+1}$ are integers. For known reasons,  $$ M\left(z_{n+k+1}-r_{1} z_{n+k}+-\cdots \pm r_{k+1} z_{n}\right)=O\left(\frac{b}{a}\right)^{n} $$  for all $n \in \mathbb{N}$ and thus there is a natural number $N$ which is so large, that  $$ z_{n+k+1}=r_{1} z_{n+k}-r_{2} z_{n+k-1}+-\cdots \mp r_{k+1} z_{n} $$  holds for all $n \geqslant N$. Now the theory of linear recursions reveals that there are some rational numbers $\delta_{0}, \delta_{1}, \delta_{2}, \ldots, \delta_{k}$ such that  $$ z_{n}=\delta_{0}(a b)^{n}-\delta_{1}\left(\frac{a}{b}\right)^{n}-\delta_{2}\left(\frac{a}{b^{3}}\right)^{n}-\cdots-\delta_{k}\left(\frac{a}{b^{2 k-1}}\right)^{n} $$  for sufficiently large $n$, where $\delta_{0}>0$ as $z_{n}>0$. As before, one obtains  $$ \begin{aligned} & A^{n} B^{n}-A^{n}-B^{n}+1=z_{n}^{2} \\ & =\left\{\delta_{0}(a b)^{n}-\delta_{1}\left(\frac{a}{b}\right)^{n}-\delta_{2}\left(\frac{a}{b^{3}}\right)^{n}-\cdots-\delta_{k}\left(\frac{a}{b^{2 k-1}}\right)^{n}\right\}^{2} \\ & =\delta_{0}^{2} A^{n} B^{n}-2 \delta_{0} \delta_{1} A^{n}-\sum_{i=2}^{i=k}\left(2 \delta_{0} \delta_{i}-\sum_{j=1}^{j=i-1} \delta_{j} \delta_{i-j}\right)\left(\frac{A}{B^{i-1}}\right)^{n}+O\left(\frac{A}{B^{k}}\right)^{n} \end{aligned} $$  Easy asymptotic calculations yield $\delta_{0}=1, \delta_{1}=\frac{1}{2}, \delta_{i}=\frac{1}{2} \sum_{j=1}^{j=i-1} \delta_{j} \delta_{i-j}$ for $i=2,3, \ldots, k-2$, and then $a=b^{k-1}$. It follows that $k>2$ and there is some $P \in \mathbb{Q}[X]$ for which $(X-1)\left(X^{k-1}-1\right)=$ $P(X)^{2}$. But this cannot occur, for instance as $X^{k-1}-1$ has no double zeros. Thus our assumption that $z_{n}$ was an integer for $n=1,2, \ldots$ turned out to be wrong, which solves the problem.  Original formulation of the problem. $a, b$ are positive integers such that $a \cdot b$ is not a square of an integer. Prove that there exists a (infinitely many) positive integer $n$ such that ( $\left.a^{n}-1\right)\left(b^{n}-1\right)$ is not a square of an integer.


Solution: Lemma. Let $c$ be a positive integer, which is not a perfect square. Then there exists an odd prime $p$ such that $c$ is not a quadratic residue modulo $p$. Proof. Denoting the square-free part of $c$ by $c^{\prime}$, we have the equality $\left(\frac{c^{\prime}}{p}\right)=\left(\frac{c}{p}\right)$ of the corresponding LegEndre symbols. Suppose that $c^{\prime}=q_{1} \cdots q_{m}$, where $q_{1}<\cdots<q_{m}$ are primes. Then we have  $$ \left(\frac{c^{\prime}}{p}\right)=\left(\frac{q_{1}}{p}\right) \cdots\left(\frac{q_{m}}{p}\right) $$  Case 1. Let $q_{1}$ be odd. We choose a quadratic nonresidue $r_{1}$ modulo $q_{1}$ and quadratic residues $r_{i}$ modulo $q_{i}$ for $i=2, \ldots, m$. By the Chinese remainder theorem and the Dirichlet theorem, there exists a (infinitely many) prime $p$ such that  $$ \begin{aligned} & p \equiv r_{1} \bmod q_{1} \\ & p \equiv r_{2} \bmod q_{2} \\ & \vdots \\ & \quad \vdots \\ & p \equiv r_{m} \bmod q_{m} \\ & p \equiv 1 \bmod 4 \end{aligned} $$  By our choice of the residues, we obtain  $$ \left(\frac{p}{q_{i}}\right)=\left(\frac{r_{i}}{q_{i}}\right)= \begin{cases}-1, & i=1 \\ 1, & i=2, \ldots, m\end{cases} $$  The congruence $p \equiv 1 \bmod 4$ implies that $\left(\frac{q_{i}}{p}\right)=\left(\frac{p}{q_{i}}\right), i=1, \ldots, m$, by the law of quadratic reciprocity. Thus  $$ \left(\frac{c^{\prime}}{p}\right)=\left(\frac{q_{1}}{p}\right) \cdots\left(\frac{q_{m}}{p}\right)=-1 $$  Case 2. Suppose $q_{1}=2$. We choose quadratic residues $r_{i}$ modulo $q_{i}$ for $i=2, \ldots, m$. Again, by the Chinese remainder theorem and the Dirichlet theorem, there exists a prime $p$ such that  $$ \begin{aligned} & p \equiv r_{2} \bmod q_{2} \\ & \vdots \\ & \quad \vdots \\ & p \equiv r_{m} \bmod q_{m} \\ & p \equiv 5 \bmod 8 \end{aligned} $$  By the choice of the residues, we obtain $\left(\frac{p}{q_{i}}\right)=\left(\frac{r_{i}}{q_{i}}\right)=1$ for $i=2, \ldots, m$. Since $p \equiv 1 \bmod 4$ we have $\left(\frac{q_{i}}{p}\right)=\left(\frac{p}{q_{i}}\right), i=2, \ldots, m$, by the law of quadratic reciprocity. The congruence $p \equiv 5 \bmod 8$ implies that $\left(\frac{2}{p}\right)=-1$. Thus  $$ \left(\frac{c^{\prime}}{p}\right)=\left(\frac{2}{p}\right)\left(\frac{q_{2}}{p}\right) \cdots\left(\frac{q_{m}}{p}\right)=-1 $$  and the lemma is proved. Applying the lemma for $c=a \cdot b$, we find an odd prime $p$ such that  $$ \left(\frac{a b}{p}\right)=\left(\frac{a}{p}\right) \cdot\left(\frac{b}{p}\right)=-1 . $$  This implies either  $$ a^{\frac{p-1}{2}} \equiv 1 \bmod p, \quad b^{\frac{p-1}{2}} \equiv-1 \bmod p, \quad \text { or } \quad a^{\frac{p-1}{2}} \equiv-1 \bmod p, \quad b^{\frac{p-1}{2}} \equiv 1 \bmod p $$  Without loss of generality, suppose that $a^{\frac{p-1}{2}} \equiv 1 \bmod p$ and $b^{\frac{p-1}{2}} \equiv-1 \bmod p$. The second congruence implies that $b^{\frac{p-1}{2}}-1$ is not divisible by $p$. Hence, if the exponent $\nu_{p}\left(a^{\frac{p-1}{2}}-1\right)$ of $p$ in the prime decomposition of $\left(a^{\frac{p-1}{2}}-1\right)$ is odd, then $\left(a^{\frac{p-1}{2}}-1\right)\left(b^{\frac{p-1}{2}}-1\right)$ is not a perfect square. If $\nu_{p}\left(a^{\frac{p-1}{2}}-1\right)$ is even, then $\nu_{p}\left(a^{\frac{p-1}{2} p}-1\right)$ is odd by the well-known power lifting property  $$ \nu_{p}\left(a^{\frac{p-1}{2} p}-1\right)=\nu_{p}\left(a^{\frac{p-1}{2}}-1\right)+1 . $$  In this case, $\left(a^{\frac{p-1}{2} p}-1\right)\left(b^{\frac{p-1}{2} p}-1\right)$ is not a perfect square.  Comment 1. In 1998, the following problem appeared in Crux Mathematicorum: Problem 2344. Find all positive integers $N$ that are quadratic residues modulo all primes greater than $N$. The published solution (Crux Mathematicorum, 25(1999)4) is the same as the proof of the lemma given above, see also http://www.mathlinks.ro/viewtopic.php?t=150495.  Comment 2. There is also an elementary proof of the lemma. We cite Theorem 3 of Chapter 5 and its proof from the book Ireland, Rosen: A Classical Introduction to Modern Number Theory, Springer 1982. Theorem. Let $a$ be a nonsquare integer. Then there are infinitely many primes $p$ for which $a$ is a quadratic nonresidue. Proof. It is easily seen that we may assume that $a$ is square-free. Let $a=2^{e} q_{1} q_{2} \cdots q_{n}$, where $q_{i}$ are distinct odd primes and $e=0$ or 1 . The case $a=2$ has to be dealt with separately. We shall assume to begin with that $n \geq 1$, i. e., that $a$ is divisible by an odd prime.  Let $\ell_{1}, \ell_{2}, \ldots, \ell_{k}$ be a finite set of odd primes not including any $q_{i}$. Let $s$ be any quadratic nonresidue $\bmod q_{n}$, and find a simultaneous solution to the congruences  $$ \begin{aligned} & x \equiv 1 \bmod \ell_{i}, \quad i=1, \ldots, k, \\ & x \equiv 1 \bmod 8, \\ & x \equiv 1 \bmod q_{i}, \quad i=1, \ldots, n-1, \\ & x \equiv s \bmod q_{n} . \end{aligned} $$  Call the solution $b . b$ is odd. Suppose that $b=p_{1} p_{2} \cdots p_{m}$ is its prime decomposition. Since $b \equiv 1 \bmod 8$ we have $\left(\frac{2}{b}\right)=1$ and $\left(\frac{q_{i}}{b}\right)=\left(\frac{b}{q_{i}}\right)$ by a result on JACOBI symbols. Thus  $$ \left(\frac{a}{b}\right)=\left(\frac{2}{b}\right)^{e}\left(\frac{q_{1}}{b}\right) \cdots\left(\frac{q_{n-1}}{b}\right)\left(\frac{q_{n}}{b}\right)=\left(\frac{b}{q_{1}}\right) \cdots\left(\frac{b}{q_{n-1}}\right)\left(\frac{b}{q_{n}}\right)=\left(\frac{1}{q_{1}}\right) \cdots\left(\frac{1}{q_{n-1}}\right)\left(\frac{s}{q_{n}}\right)=-1 $$  On the other hand, by the definition of $\left(\frac{a}{b}\right)$, we have $\left(\frac{a}{b}\right)=\left(\frac{a}{p_{1}}\right)\left(\frac{a}{p_{2}}\right) \cdots\left(\frac{a}{p_{m}}\right)$. It follows that $\left(\frac{a}{p_{i}}\right)=-1$ for some $i$. Notice that $\ell_{j}$ does not divide $b$. Thus $p_{i} \notin\left\{\ell_{1}, \ell_{2}, \ldots, \ell_{k}\right\}$. To summarize, if $a$ is a nonsquare, divisible by an odd prime, we have found a prime $p$, outside of a given finite set of primes $\left\{2, \ell_{1}, \ell_{2}, \ldots, \ell_{k}\right\}$, such that $\left(\frac{a}{p}\right)=-1$. This proves the theorem in this case.  It remains to consider the case $a=2$. Let $\ell_{1}, \ell_{2}, \ldots, \ell_{k}$ be a finite set of primes, excluding 3 , for which $\left(\frac{2}{\ell_{i}}\right)=-1$. Let $b=8 \ell_{1} \ell_{2} \cdots \ell_{k}+3 . b$ is not divisible by 3 or any $\ell_{i}$. Since $b \equiv 3 \bmod 8$ we have $\left(\frac{2}{b}\right)=(-1)^{\frac{b^{2}-1}{8}}=-1$. Suppose that $b=p_{1} p_{2} \cdots p_{m}$ is the prime decomposition of b. Then, as before, we see that $\left(\frac{2}{p_{i}}\right)=-1$ for some $i . p_{i} \notin\left\{3, \ell_{1}, \ell_{2}, \ldots, \ell_{k}\right\}$. This proves the theorem for $a=2$. This proof has also been posted to mathlinks, see http://www.mathlinks.ro/viewtopic. php?t=150495 again.  The IMO 2009 is organised by §Bildung


CZE   Find the largest possible integer $k$, such that the following statement is true: Let 2009 arbitrary non-degenerated triangles be given. In every triangle the three sides are colored, such that one is blue, one is red and one is white. Now, for every color separately, let us sort the lengths of the sides. We obtain  $$ \begin{array}{rlrl} b_{1} & \leq b_{2} & \leq \ldots \leq b_{2009} \quad & \\ & & \text { the lengths of the blue sides, } \\ r_{1} & \leq r_{2} & \leq \ldots \leq r_{2009} \quad \text { the lengths of the red sides, } \\ w_{1} & \leq w_{2} & \leq \ldots \leq w_{2009} \quad \text { the lengths of the white sides. } \end{array} $$  Then there exist $k$ indices $j$ such that we can form a non-degenerated triangle with side lengths $b_{j}, r_{j}, w_{j}$ 。

Solution: We will prove that the largest possible number $k$ of indices satisfying the given condition is one. Firstly we prove that $b_{2009}, r_{2009}, w_{2009}$ are always lengths of the sides of a triangle. Without loss of generality we may assume that $w_{2009} \geq r_{2009} \geq b_{2009}$. We show that the inequality $b_{2009}+r_{2009}>w_{2009}$ holds. Evidently, there exists a triangle with side lengths $w, b, r$ for the white, blue and red side, respectively, such that $w_{2009}=w$. By the conditions of the problem we have $b+r>w, b_{2009} \geq b$ and $r_{2009} \geq r$. From these inequalities it follows  $$ b_{2009}+r_{2009} \geq b+r>w=w_{2009} $$  Secondly we will describe a sequence of triangles for which $w_{j}, b_{j}, r_{j}$ with $j<2009$ are not the lengths of the sides of a triangle. Let us define the sequence $\Delta_{j}, j=1,2, \ldots, 2009$, of triangles, where $\Delta_{j}$ has a blue side of length $2 j$, a red side of length $j$ for all $j \leq 2008$ and 4018 for $j=2009$, and a white side of length $j+1$ for all $j \leq 2007$, 4018 for $j=2008$ and 1 for $j=2009$. Since  $$ \begin{array}{rrrl} (j+1)+j>2 j & \geq j+1>j, & \text { if } & j \leq 2007 \\ 2 j+j>4018>2 j \quad>j, & \text { if } & j=2008 \\ 4018+1>2 j & =4018>1, & \text { if } & j=2009 \end{array} $$  such a sequence of triangles exists. Moreover, $w_{j}=j, r_{j}=j$ and $b_{j}=2 j$ for $1 \leq j \leq 2008$. Then  $$ w_{j}+r_{j}=j+j=2 j=b_{j} $$  i.e., $b_{j}, r_{j}$ and $w_{j}$ are not the lengths of the sides of a triangle for $1 \leq j \leq 2008$.


FRA   Determine all functions $f$ from the set of positive integers into the set of positive integers such that for all $x$ and $y$ there exists a non degenerated triangle with sides of lengths  $$ x, \quad f(y) \quad \text { and } \quad f(y+f(x)-1) . $$

Solution: The identity function $f(x)=x$ is the only solution of the problem. If $f(x)=x$ for all positive integers $x$, the given three lengths are $x, y=f(y)$ and $z=$ $f(y+f(x)-1)=x+y-1$. Because of $x \geq 1, y \geq 1$ we have $z \geq \max \{x, y\}>|x-y|$ and $z<x+y$. From this it follows that a triangle with these side lengths exists and does not degenerate. We prove in several steps that there is no other solution.  Step 1. We show $f(1)=1$. If we had $f(1)=1+m>1$ we would conclude $f(y)=f(y+m)$ for all $y$ considering the triangle with the side lengths $1, f(y)$ and $f(y+m)$. Thus, $f$ would be $m$-periodic and, consequently, bounded. Let $B$ be a bound, $f(x) \leq B$. If we choose $x>2 B$ we obtain the contradiction $x>2 B \geq f(y)+f(y+f(x)-1)$.  Step 2. For all positive integers $z$, we have $f(f(z))=z$. Setting $x=z$ and $y=1$ this follows immediately from Step 1.  Step 3. For all integers $z \geq 1$, we have $f(z) \leq z$. Let us show, that the contrary leads to a contradiction. Assume $w+1=f(z)>z$ for some $z$. From Step 1 we know that $w \geq z \geq 2$. Let $M=\max \{f(1), f(2), \ldots, f(w)\}$ be the largest value of $f$ for the first $w$ integers. First we show, that no positive integer $t$ exists with  $$ f(t)>\frac{z-1}{w} \cdot t+M $$  otherwise we decompose the smallest value $t$ as $t=w r+s$ where $r$ is an integer and $1 \leq s \leq w$. Because of the definition of $M$, we have $t>w$. Setting $x=z$ and $y=t-w$ we get from the triangle inequality  $$ z+f(t-w)>f((t-w)+f(z)-1)=f(t-w+w)=f(t) $$  Hence,  $$ f(t-w) \geq f(t)-(z-1)>\frac{z-1}{w}(t-w)+M $$  a contradiction to the minimality of $t$. Therefore the inequality (1) fails for all $t \geq 1$, we have proven  $$ f(t) \leq \frac{z-1}{w} \cdot t+M $$  instead.  Now, using (2), we finish the proof of Step 3. Because of $z \leq w$ we have $\frac{z-1}{w}<1$ and we can choose an integer $t$ sufficiently large to fulfill the condition  $$ \left(\frac{z-1}{w}\right)^{2} t+\left(\frac{z-1}{w}+1\right) M<t . $$  Applying (2) twice we get  $$ f(f(t)) \leq \frac{z-1}{w} f(t)+M \leq \frac{z-1}{w}\left(\frac{z-1}{w} t+M\right)+M<t $$  in contradiction to Step 2, which proves Step 3.  Final step. Thus, following Step 2 and Step 3, we obtain  $$ z=f(f(z)) \leq f(z) \leq z $$  and $f(z)=z$ for all positive integers $z$ is proven.


RUS   Variant 1. A grasshopper jumps along the real axis. He starts at point 0 and makes 2009 jumps to the right with lengths $1,2, \ldots, 2009$ in an arbitrary order. Let $M$ be a set of 2008 positive integers less than $1005 \cdot 2009$. Prove that the grasshopper can arrange his jumps in such a way that he never lands on a point from $M$.  Variant 2. Let $n$ be a nonnegative integer. A grasshopper jumps along the real axis. He starts at point 0 and makes $n+1$ jumps to the right with pairwise different positive integral lengths $a_{1}, a_{2}, \ldots, a_{n+1}$ in an arbitrary order. Let $M$ be a set of $n$ positive integers in the interval $(0, s)$, where $s=a_{1}+a_{2}+\cdots+a_{n+1}$. Prove that the grasshopper can arrange his jumps in such a way that he never lands on a point from $M$.  Solution of Variant 1. We construct the set of landing points of the grasshopper. Case 1. $M$ does not contain numbers divisible by 2009. We fix the numbers $2009 k$ as landing points, $k=1,2, \ldots, 1005$. Consider the open intervals $I_{k}=(2009(k-1), 2009 k), k=1,2, \ldots, 1005$. We show that we can choose exactly one point outside of $M$ as a landing point in 1004 of these intervals such that all lengths from 1 to 2009 are realized. Since there remains one interval without a chosen point, the length 2009 indeed will appear. Each interval has length 2009, hence a new landing point in an interval yields with a length $d$ also the length $2009-d$. Thus it is enough to implement only the lengths from $D=\{1,2, \ldots, 1004\}$. We will do this in a greedy way. Let $n_{k}, k=1,2, \ldots, 1005$, be the number of elements of $M$ that belong to the interval $I_{k}$. We order these numbers in a decreasing way, so let $p_{1}, p_{2}, \ldots, p_{1005}$ be a permutation of $\{1,2, \ldots, 1005\}$ such that $n_{p_{1}} \geq n_{p_{2}} \geq \cdots \geq n_{p_{1005}}$. In $I_{p_{1}}$ we do not choose a landing point. Assume that landing points have already been chosen in the intervals $I_{p_{2}}, \ldots, I_{p_{m}}$ and the lengths $d_{2}, \ldots, d_{m}$ from $D$ are realized, $m=1, \ldots, 1004$. We show that there is some $d \in D \backslash\left\{d_{2}, \ldots, d_{m}\right\}$ that can be implemented with a new landing point in $I_{p_{m+1}}$. Assume the contrary. Then the $1004-(m-1)$ other lengths are obstructed by the $n_{p_{m+1}}$ points of $M$ in $I_{p_{m+1}}$. Each length $d$ can be realized by two landing points, namely $2009\left(p_{m+1}-1\right)+d$ and $2009 p_{m+1}-d$, hence  $$ n_{p_{m+1}} \geq 2(1005-m) $$  Moreover, since $|M|=2008=n_{1}+\cdots+n_{1005}$,  $$ 2008 \geq n_{p_{1}}+n_{p_{2}}+\cdots+n_{p_{m+1}} \geq(m+1) n_{p_{m+1}} $$  Consequently, by (1) and (2),  $$ 2008 \geq 2(m+1)(1005-m) $$  The right hand side of the last inequality obviously attains its minimum for $m=1004$ and this minimum value is greater than 2008, a contradiction. Case 2. $M$ does contain a number $\mu$ divisible by 2009. By the pigeonhole principle there exists some $r \in\{1, \ldots, 2008\}$ such that $M$ does not contain numbers with remainder $r$ modulo 2009. We fix the numbers $2009(k-1)+r$ as landing points, $k=1,2, \ldots, 1005$. Moreover, $1005 \cdot 2009$ is a landing point. Consider the open intervals $I_{k}=(2009(k-1)+r, 2009 k+r), k=1,2, \ldots, 1004$. Analogously to Case 1 , it is enough to show that we can choose in 1003 of these intervals exactly one landing point outside of $M \backslash\{\mu\}$ such that each of the lengths of $D=\{1,2, \ldots, 1004\} \backslash\{r\}$ are implemented. Note that $r$ and $2009-r$ are realized by the first and last jump and that choosing $\mu$ would realize these two differences again. Let $n_{k}, k=1,2, \ldots, 1004$, be the number of elements of $M \backslash\{\mu\}$ that belong to the interval $I_{k}$ and $p_{1}, p_{2}, \ldots, p_{1004}$ be a permutation of $\{1,2, \ldots, 1004\}$ such that $n_{p_{1}} \geq n_{p_{2}} \geq \cdots \geq n_{p_{1004}}$. With the same reasoning as in Case 1 we can verify that a greedy choice of the landing points in $I_{p_{2}}, I_{p_{3}}, \ldots, I_{p_{1004}}$ is possible. We only have to replace (1) by  $$ n_{p_{m+1}} \geq 2(1004-m) $$  ( $D$ has one element less) and (2) by  $$ 2007 \geq n_{p_{1}}+n_{p_{2}}+\cdots+n_{p_{m+1}} \geq(m+1) n_{p_{m+1}} $$  Comment. The cardinality 2008 of $M$ in the problem is the maximum possible value. For $M=\{1,2, \ldots, 2009\}$, the grasshopper necessarily lands on a point from $M$.  Solution of Variant 2. First of all we remark that the statement in the problem implies a strengthening of itself: Instead of $|M|=n$ it is sufficient to suppose that $|M \cap(0, s-\bar{a}]| \leq n$, where $\bar{a}=\min \left\{a_{1}, a_{2}, \ldots, a_{n+1}\right\}$. This fact will be used in the proof. We prove the statement by induction on $n$. The case $n=0$ is obvious. Let $n>0$ and let the assertion be true for all nonnegative integers less than $n$. Moreover let $a_{1}, a_{2}, \ldots, a_{n+1}, s$ and $M$ be given as in the problem. Without loss of generality we may assume that $a_{n+1}<a_{n}<$ $\cdots<a_{2}<a_{1}$. Set  $$ T_{k}=\sum_{i=1}^{k} a_{i} \quad \text { for } k=0,1, \ldots, n+1 $$  Note that $0=T_{0}<T_{1}<\cdots<T_{n+1}=s$. We will make use of the induction hypothesis as follows:  Claim 1. It suffices to show that for some $m \in\{1,2, \ldots, n+1\}$ the grasshopper is able to do at least $m$ jumps without landing on a point of $M$ and, in addition, after these $m$ jumps he has jumped over at least $m$ points of $M$. Proof. Note that $m=n+1$ is impossible by $|M|=n$. Now set $n^{\prime}=n-m$. Then $0 \leq n^{\prime}<n$. The remaining $n^{\prime}+1$ jumps can be carried out without landing on one of the remaining at most $n^{\prime}$ forbidden points by the induction hypothesis together with a shift of the origin. This proves the claim. An integer $k \in\{1,2, \ldots, n+1\}$ is called smooth, if the grasshopper is able to do $k$ jumps with the lengths $a_{1}, a_{2}, \ldots, a_{k}$ in such a way that he never lands on a point of $M$ except for the very last jump, when he may land on a point of $M$. Obviously, 1 is smooth. Thus there is a largest number $k^{*}$, such that all the numbers $1,2, \ldots, k^{*}$ are smooth. If $k^{*}=n+1$, the proof is complete. In the following let $k^{*} \leq n$. Claim 2. We have  $$ T_{k^{*}} \in M \quad \text { and } \quad\left|M \cap\left(0, T_{k^{*}}\right)\right| \geq k^{*} . $$  Proof. In the case $T_{k^{*}} \notin M$ any sequence of jumps that verifies the smoothness of $k^{*}$ can be extended by appending $a_{k^{*}+1}$, which is a contradiction to the maximality of $k^{*}$. Therefore we have $T_{k^{*}} \in M$. If $\left|M \cap\left(0, T_{k^{*}}\right)\right|<k^{*}$, there exists an $l \in\left\{1,2, \ldots, k^{*}\right\}$ with $T_{k^{*}+1}-a_{l} \notin M$. By the induction hypothesis with $k^{*}-1$ instead of $n$, the grasshopper is able to reach $T_{k^{*}+1}-a_{l}$ with $k^{*}$ jumps of lengths from $\left\{a_{1}, a_{2}, \ldots, a_{k^{*}+1}\right\} \backslash\left\{a_{l}\right\}$ without landing on any point of $M$. Therefore $k^{*}+1$ is also smooth, which is a contradiction to the maximality of $k^{*}$. Thus Claim 2 is proved. Now, by Claim 2, there exists a smallest integer $\bar{k} \in\left\{1,2, \ldots, k^{*}\right\}$ with  $$ T_{\bar{k}} \in M \quad \text { and } \quad\left|M \cap\left(0, T_{\bar{k}}\right)\right| \geq \bar{k} $$  Claim 3. It is sufficient to consider the case  $$ \left|M \cap\left(0, T_{\bar{k}-1}\right]\right| \leq \bar{k}-1 $$  Proof. If $\bar{k}=1$, then (4) is clearly satisfied. In the following let $\bar{k}>1$. If $T_{\bar{k}-1} \in M$, then (4.) follows immediately by the minimality of $\bar{k}$. If $T_{\bar{k}-1} \notin M$, by the smoothness of $\bar{k}-1$, we obtain a situation as in Claim 1 with $m=\bar{k}-1$ provided that $\mid M \cap\left(0, T_{\bar{k}-1}| | \geq \bar{k}-1\right.$. Hence, we may even restrict ourselves to $\mid M \cap\left(0, T_{\bar{k}-1} \mid \leq \bar{k}-2\right.$ in this case and Claim 3 is proved. Choose an integer $v \geq 0$ with $\left|M \cap\left(0, T_{\bar{k}}\right)\right|=\bar{k}+v$. Let $r_{1}>r_{2}>\cdots>r_{l}$ be exactly those indices $r$ from $\{\bar{k}+1, \bar{k}+2, \ldots, n+1\}$ for which $T_{\bar{k}}+a_{r} \notin M$. Then  $$ n=|M|=\left|M \cap\left(0, T_{\bar{k}}\right)\right|+1+\left|M \cap\left(T_{\bar{k}}, s\right)\right| \geq \bar{k}+v+1+(n+1-\bar{k}-l) $$  and consequently $l \geq v+2$. Note that $T_{\bar{k}}+a_{r_{1}}-a_{1}<T_{\bar{k}}+a_{r_{1}}-a_{2}<\cdots<T_{\bar{k}}+a_{r_{1}}-a_{\bar{k}}<T_{\bar{k}}+a_{r_{2}}-a_{\bar{k}}<\cdots<T_{\bar{k}}+a_{r_{v+2}}-a_{\bar{k}}<T_{\bar{k}}$ and that this are $\bar{k}+v+1$ numbers from $\left(0, T_{\bar{k}}\right)$. Therefore we find some $r \in\{\bar{k}+1, \bar{k}+$ $2, \ldots, n+1\}$ and some $s \in\{1,2, \ldots, \bar{k}\}$ with $T_{\bar{k}}+a_{r} \notin M$ and $T_{\bar{k}}+a_{r}-a_{s} \notin M$. Consider the set of jump lengths $B=\left\{a_{1}, a_{2}, \ldots, a_{\bar{k}}, a_{r}\right\} \backslash\left\{a_{s}\right\}$. We have  $$ \sum_{x \in B} x=T_{\bar{k}}+a_{r}-a_{s} $$  and  $$ T_{\bar{k}}+a_{r}-a_{s}-\min (B)=T_{\bar{k}}-a_{s} \leq T_{\bar{k}-1} . $$  By (4) and the strengthening, mentioned at the very beginning with $\bar{k}-1$ instead of $n$, the grasshopper is able to reach $T_{\bar{k}}+a_{r}-a_{s}$ by $\bar{k}$ jumps with lengths from $B$ without landing on any point of $M$. From there he is able to jump to $T_{\bar{k}}+a_{r}$ and therefore we reach a situation as in Claim 1 with $m=\bar{k}+1$, which completes the proof.


PER   A positive integer $N$ is called balanced, if $N=1$ or if $N$ can be written as a product of an even number of not necessarily distinct primes. Given positive integers $a$ and $b$, consider the polynomial $P$ defined by $P(x)=(x+a)(x+b)$. (a) Prove that there exist distinct positive integers $a$ and $b$ such that all the numbers $P(1), P(2)$, ..., $P(50)$ are balanced. (b) Prove that if $P(n)$ is balanced for all positive integers $n$, then $a=b$.