exam: BalticWay

problem: Let $\alpha$ be the angle between two lines containing the diagonals of a regular 1996-gon, and let $\beta \neq 0$ be another such angle. Prove that $\alpha / \beta$ is a rational number.

solution:
Let $O$ be the circumcentre of the 1996-gon. Consider two diagonals $A B$ and $C D$. There is a rotation around $O$ that takes the point $C$ to $A$ and $D$ to a point $D^{\prime}$. Clearly the angle of this rotation is a multiple of $2 \varphi=2 \pi / 1996$.

The angle $B A D^{\prime}$ is the inscribed angle on the $\operatorname{arc} B D^{\prime}$, and hence is an integral multiple of $\varphi$, the inscribed angle on the arc between any two adjacent vertices of the 1996-gon. Hence the angle between $A B$ and $C D$ is also an integral multiple of $\varphi$.

Since both $\alpha$ and $\beta$ are integral multiples of $\varphi, \alpha / \beta$ is a rational number.

solution_match: Solution.


problem:
In the figure below, you see three half-circles. The circle $C$ is tangent to two of the half-circles and to the line $P Q$ perpendicular to the diameter $A B$. The area of the shaded region is $39 \pi$, and the area of the circle $C$ is $9 \pi$. Find the length of the diameter $A B$.

![](https://cdn.mathpix.com/cropped/2024_04_17_e2580b6720254e51741dg-1.jpg?height=288&width=500&top_left_y=1084&top_left_x=824)

Figure 1

solution:
Let $r$ and $s$ be the radii of the half-circles with diameters $A P$ and $B P$. Then we have

$$
39 \pi=\frac{\pi}{2}\left((r+s)^{2}-r^{2}-s^{2}\right)-9 \pi
$$

hence $r s=48$. Let $M$ be the midpoint of the diameter $A B, N$ be the midpoint of $P B, O$ be the centre of the circle $C$, and let $F$ be the orthogonal projection of $O$ on $A B$. Since the radius of $C$ is 3 , we have $|M O|=r+s-3,|M F|=r-s+3,|O N|=s+3$, and $|F N|=s-3$.

Applying the Pythagorean theorem to the triangles $M F O$ and $N F O$ yields

$$
(r+s-3)^{2}-(r-s+3)^{2}=|O F|^{2}=(s+3)^{2}-(s-3)^{2},
$$

which implies $r(s-3)=3 s$, so that $3(r+s)=r s=48$. Hence $|A B|=2(r+s)=32$.


problem: Let $A B C D$ be a unit square and let $P$ and $Q$ be points in the plane such that $Q$ is the circumcentre of triangle $B P C$ and $D$ is the circumcentre of triangle $P Q A$. Find all possible values of the length of segment $P Q$.

solution:
As $Q$ is the circumcentre of triangle $B P C$, we have $|P Q|=|Q C|$ and $Q$ lies on the perpendicular bisector $s$ of $B C$. On the other hand, as $D$ is the circumcentre of triangle $P Q A, Q$ lies on the circle centred at $D$ and passing through $A$. Thus $Q$ must be one of the two intersection points $Q_{1}$ and $Q_{2}$ of this circle and the line $s$. We may choose $Q_{1}$ to lie inside, and $Q_{2}$ outside of the square $A B C D$.

Let $E$ and $F$ be the midpoints of $A D$ and $B C$, respectively. We have $\left|A Q_{1}\right|=\left|D Q_{1}\right|=|D A|=1$. Hence $\left|E Q_{1}\right|=\frac{\sqrt{3}}{2}$ and $\left|F Q_{1}\right|=1-\frac{\sqrt{3}}{2}$. The Pythagorean theorem applied to the triangle $C F Q_{1}$ now yields

$$
\left|C Q_{1}\right|^{2}=|C F|^{2}+\left|F Q_{1}\right|^{2}=\left(\frac{1}{2}\right)^{2}+\left(1-\frac{\sqrt{3}}{2}\right)^{2}=2-\sqrt{3}
$$

and hence $\left|C Q_{1}\right|=\sqrt{2-\sqrt{3}}$. Similarly, $\left|Q_{2} E\right|=\frac{\sqrt{3}}{2}$, and the Pythagorean theorem applied to the triangle $C F Q_{2}$ now yields

$$
\left|C Q_{2}\right|^{2}=|C F|^{2}+\left|F Q_{2}\right|^{2}=\left(\frac{1}{2}\right)^{2}+\left(1+\frac{\sqrt{3}}{2}\right)^{2}=2+\sqrt{3}
$$

and hence $\left|C Q_{2}\right|=\sqrt{2+\sqrt{3}}$. Hence the possible values of the length of the segment $P Q$ are $\sqrt{2-\sqrt{3}}$ and $\sqrt{2+\sqrt{3}}$.

Remark. The actual location of the point $P$ is unimportant for us. Note however that the point $P$ exists because $P$ and $C$ are the two intersection points of the circle centred at $D$ passing through $A$ and the circle centred at $Q$ passing through $C$.


problem: $A B C D$ is a trapezium $(A D \| B C) . P$ is the point on the line $A B$ such that $\angle C P D$ is maximal. $Q$ is the point on the line $C D$ such that $\angle B Q A$ is maximal. Given that $P$ lies on the segment $A B$, prove that $\angle C P D=\angle B Q A$.

solution:
The property that $\angle C P D$ is maximal is equivalent to the property that the circle $C P D$ touches the line $A B$ (at $P$ ). Let $O$ be the intersection point of the lines $A B$ and $C D$, and let $\ell$ be the bisector of $\angle A O D$. Let $A^{\prime}, B^{\prime}$ and $Q^{\prime}$ be the points symmetrical to $A, B$ and $Q$, respectively, relative to the line $\ell$. Then the circle $A Q B$ is symmetrical to the circle $A^{\prime} Q^{\prime} B^{\prime}$ that touches the line $A B$ at $Q^{\prime}$. We have

$$
\frac{|O D|}{\left|O A^{\prime}\right|}=\frac{|O D|}{|O A|}=\frac{|O C|}{|O B|}=\frac{|O C|}{\left|O B^{\prime}\right|}
$$

Hence the homothety with centre $O$ and coefficient $|O D| /|O A|$ takes $A^{\prime}$ to $D, B^{\prime}$ to $C$, and $Q^{\prime}$ to a point $Q^{\prime \prime}$ such that the circle $C Q^{\prime \prime} D$ touches the line $A B$, and thus $Q^{\prime \prime}$ coincides with $P$. Therefore $\angle A Q B=\angle A^{\prime} Q^{\prime} B^{\prime}=\angle C Q^{\prime \prime} D=\angle C P D$ as required.


problem: Let $A B C D$ be a cyclic convex quadrilateral and let $r_{a}, r_{b}, r_{c}, r_{d}$ be the radii of the circles inscribed in the triangles $B C D, A C D, A B D, A B C$ respectively. Prove that $r_{a}+r_{c}=r_{b}+r_{d}$.

solution:
For a triangle $M N K$ with in-radius $r$ and circumradius $R$, the equality

$$
\cos \angle M+\cos \angle N+\cos \angle K=1+\frac{r}{R}
$$

hold; this follows from the cosine theorem and formulas for $r$ and $R$.

We have $\angle A C B=\angle A D B, \angle B D C=\angle B A C, \angle C A D=\angle C B D$ and $\angle D B A=\angle D C A$. Denoting these angles by $\alpha, \beta, \gamma$ and $\delta$, respectively, we get $r_{a}=(\cos \beta+\cos \gamma+\cos (\alpha+\delta)-1) R$ and $r_{c}=(\cos \alpha+\cos \delta+$ $\cos (\beta+\gamma)-1) R$. Since $\cos (\alpha+\delta)=-\cos (\beta+\gamma)$, we get

$$
r_{a}+r_{c}=(\cos \alpha+\cos \beta+\cos \gamma+\cos \delta-2) R .
$$

Similarly,

$$
r_{b}+r_{d}=(\cos \alpha+\cos \beta+\cos \gamma+\cos \delta-2) R,
$$

where $R$ is the circumradius of the quadrangle $A B C D$.


problem: Let $a, b, c, d$ be positive integers such that $a b=c d$. Prove that $a+b+c+d$ is not prime.

solution: . As $a b=c d$, we get $a(a+b+c+d)=(a+c)(a+d)$. If $a+b+c+d$ were a prime, then it would be a factor in either $a+c$ or $a+d$, which are both smaller than $a+b+c+d$.

solution_match: Solution 1


solution:
. Let $r=\operatorname{gcd}(a, c)$ and $s=\operatorname{gcd}(b, d)$. Let $a=a^{\prime} r, b=b^{\prime} s, c=c^{\prime} r$ and $d=d^{\prime} s$. Then $a^{\prime} b^{\prime}=c^{\prime} d^{\prime}$. But $\operatorname{gcd}\left(a^{\prime}, c^{\prime}\right)=1$ and $\operatorname{gcd}\left(b^{\prime}, d^{\prime}\right)=1$, so we must have $a^{\prime}=d^{\prime}$ and $b^{\prime}=c^{\prime}$. This gives

$$
a+b+c+d=a^{\prime} r+b^{\prime} s+c^{\prime} r+d^{\prime} s=a^{\prime} r+b^{\prime} s+b^{\prime} r+a^{\prime} s=\left(a^{\prime}+b^{\prime}\right)(r+s) \text {. }
$$

Since $a^{\prime}, b^{\prime}, r$ and $s$ are positive integers, $a+b+c+d$ is not a prime.

solution_match: Solution 2


problem:
A sequence of integers $a_{1}, a_{2}, \ldots$, is such that $a_{1}=1, a_{2}=2$ and for $n \geq 1$

$$
a_{n+2}= \begin{cases}5 a_{n+1}-3 a_{n} & \text { if } a_{n} \cdot a_{n+1} \text { is even, } \\ a_{n+1}-a_{n} & \text { if } a_{n} \cdot a_{n+1} \text { is odd. }\end{cases}
$$

Prove that $a_{n} \neq 0$ for all $n$.

solution: Considering the sequence modulo 6 we obtain 1, 2, 1, 5, 4, 5, 1, 2, ... The conclusion follows.


problem:
Consider the sequence

$$
\begin{aligned}
x_{1} & =19, \\
x_{2} & =95, \\
x_{n+2} & =\operatorname{lcm}\left(x_{n+1}, x_{n}\right)+x_{n},
\end{aligned}
$$

for $n>1$, where $\operatorname{lcm}(a, b)$ means the least common multiple of $a$ and $b$. Find the greatest common divisor of $x_{1995}$ and $x_{1996}$.

solution:
Let $d=\operatorname{gcd}\left(x_{k}, x_{k+1}\right)$. Then $\operatorname{lcm}\left(x_{k}, x_{k+1}\right)=x_{k} x_{k+1} / d$, and

$$
\operatorname{gcd}\left(x_{k+1}, x_{k+2}\right)=\operatorname{gcd}\left(x_{k+1}, \frac{x_{k} x_{k+1}}{d}+x_{k}\right)=\operatorname{gcd}\left(x_{k+1}, \frac{x_{k}}{d}\left(x_{k+1}+d\right)\right) .
$$

Since $x_{k+1}$ and $x_{k} / d$ are relatively prime, this equals $\operatorname{gcd}\left(x_{k+1}, x_{k+1}+d\right)=d$. It follows by induction that $\operatorname{gcd}\left(x_{n}, x_{n+1}\right)=\operatorname{gcd}\left(x_{1}, x_{2}\right)=19$ for all $n \geq 1$. Hence $\operatorname{gcd}\left(x_{1995}, x_{1996}\right)=19$.


problem:
Let $n$ and $k$ be integers, $1<k \leq n$. Find an integer $b$ and a set $A$ of $n$ integers satisfying the following conditions:

(i) No product of $k-1$ distinct elements of $A$ is divisible by $b$.

(ii) Every product of $k$ distinct elements of $A$ is divisible by $b$.

(iii) For all distinct $a, a^{\prime}$ in $A$, $a$ does not divide $a^{\prime}$.

solution: Let $p_{1}, \ldots, p_{n}$ be the first $n$ odd primes. Then we can take $A=\left\{2 p_{1}, 2 p_{2}, \ldots, 2 p_{n}\right\}$ and $b=2^{k}$. It is easily seen that the conditions are satisfied.


problem:
Denote by $d(n)$ the number of distinct positive divisors of a positive integer $n$ (including 1 and $n$ ). Let $a>1$ and $n>0$ be integers such that $a^{n}+1$ is a prime. Prove that

$$
d\left(a^{n}-1\right) \geq n .
$$

solution:
First we show that $n=2^{s}$ for some integer $s \geq 0$. Indeed, if $n=m p$ where $p$ is an odd prime, then $a^{n}+1=a^{m p}+1=\left(a^{m}+1\right)\left(a^{m(p-1)}-a^{m(p-2)}+\cdots-a+1\right)$, a contradiction.

Now we use induction on $s$ to prove that $d\left(a^{2^{s}}-1\right) \geq 2^{s}$. The case $s=0$ is obvious. As $a^{2^{s}}-1=$ $\left(a^{2^{s-1}}-1\right)\left(a^{2^{s-1}}+1\right)$, then for any divisor $q$ of $a^{2^{s-1}}-1$, both $q$ and $q\left(a^{2^{s-1}}+1\right)$ are divisors of $a^{2^{s}}-1$. Since the divisors of the form $q\left(a^{2^{s-1}}+1\right)$ are all larger than $a^{2^{s-1}}-1$ we have $d\left(a^{2^{s}}-1\right) \geq 2 \cdot d\left(a^{2^{s-1}}-1\right)=2^{s}$.


problem: The real numbers $x_{1}, x_{2}, \ldots, x_{1996}$ have the following property: for any polynomial $W$ of degree 2 at least three of the numbers $W\left(x_{1}\right), W\left(x_{2}\right), \ldots, W\left(x_{1996}\right)$ are equal. Prove that at least three of the numbers $x_{1}, x_{2}, \ldots, x_{1996}$ are equal.

solution: Let $m=\min \left\{x_{1}, \ldots, x_{1996}\right\}$. Then the polynomial $W(x)=(x-m)^{2}$ is strictly increasing for $x \geq m$. Hence if $W\left(x_{i}\right)=W\left(x_{j}\right)$ we must have $x_{i}=x_{j}$, and the conclusion follows.


problem: Let $S$ be a set of integers containing the numbers 0 and 1996. Suppose further that any integer root of any non-zero polynomial with coefficients in $S$ also belongs to $S$. Prove that -2 belongs to $S$.

solution: Consider the polynomial $W(x)=1996 x+1996$. As $W(-1)=0$ we conclude that $-1 \in S$. Now consider the polynomial $U(x)=-x^{1996}-x^{1995}-\cdots-x^{2}-x+1996$. As $U(1)=0$ we have $1 \in S$. Finally, let $T(x)=-x^{10}+x^{9}-x^{8}+x^{7}-x^{6}+x^{3}-x^{2}+1996$. Then $-2 \in S$ since $T(-2)=0$.


problem:
Consider the functions $f$ defined on the set of integers such that

$$
f(x)=f\left(x^{2}+x+1\right),
$$

for all integers $x$. Find

(a) all even functions,

(b) all odd functions of this kind.

solution:
(a) For $f$ even, we have $f(x-1)=f\left((x-1)^{2}+(x-1)+1\right)=f\left(x^{2}-x+1\right)=f\left((-x)^{2}-x+1\right)=f(-x)=f(x)$ for any $x \in \mathbb{Z}$. Hence $f$ has a constant value; any constant will do.
(b) For $f$ odd, a similar computation yields $f(x-1)=-f(x)$. Since $f(0)=0$, we see that $f(x)=0$ for all $x \in \mathbb{Z}$.

solution_match: # Solution.


problem: The graph of the function $f(x)=x^{n}+a_{n-1} x^{n-1}+\cdots+a_{1} x+a_{0}$ (where $n>1$ ), intersects the line $y=b$ at the points $B_{1}, B_{2}, \ldots, B_{n}$ (from left to right), and the line $y=c(c \neq b)$ at the points $C_{1}, C_{2}, \ldots, C_{n}$ (from left to right). Let $P$ be a point on the line $y=c$, to the right to the point $C_{n}$. Find the sum $\cot \angle B_{1} C_{1} P+\cdots+\cot \angle B_{n} C_{n} P$.

solution:
Let the points $B_{i}$ and $C_{i}$ have the coordinates $\left(b_{i}, b\right)$ and $\left(c_{i}, c\right)$, respectively, for $i=1,2, \ldots, n$. Then we have

$$
\cot \angle B_{1} C_{1} P+\cdots+\cot \angle B_{n} C_{n} P=\frac{1}{b-c} \sum_{i=1}^{n}\left(b_{i}-c_{i}\right)
$$

The numbers $b_{i}$ and $c_{i}$ are the solutions of $f(x)-b=0$ and $f(x)-c=0$, respectively. As $n \geq 2$, it follows from the relationships between the roots and coefficients of a polynomial (Viète's relations) that $\sum_{i=1}^{n} b_{i}=$ $\sum_{i=1}^{n} c_{i}=-a_{n-1}$ regardless of the values of $b$ and $c$, and hence $\cot \angle B_{1} C_{1} P+\cdots+\cot \angle B_{n} C_{n} P=0$.


problem:
For which positive real numbers $a, b$ does the inequality

$$
x_{1} \cdot x_{2}+x_{2} \cdot x_{3}+\cdots+x_{n-1} \cdot x_{n}+x_{n} \cdot x_{1} \geq x_{1}^{a} \cdot x_{2}^{b} \cdot x_{3}^{a}+x_{2}^{a} \cdot x_{3}^{b} \cdot x_{4}^{a}+\cdots+x_{n}^{a} \cdot x_{1}^{b} \cdot x_{2}^{a}
$$

hold for all integers $n>2$ and positive real numbers $x_{1}, x_{2}, \ldots, x_{n}$ ?

solution:
Substituting $x_{i}=x$ easily yields that $2 a+b=2$. Now take $n=4, x_{1}=x_{3}=x$ and $x_{2}=x_{4}=1$. This gives $2 x \geq x^{2 a}+x^{b}$. But the inequality between the arithmetic and geometric mean yields $x^{2 a}+x^{b} \geq$ $2 \sqrt{x^{2 a} x^{b}}=2 x$. Here equality must hold, and this implies that $x^{2 a}=x^{b}$, which gives $2 a=b=1$.

On the other hand, if $b=1$ and $a=\frac{1}{2}$, we let $y_{i}=\sqrt{x_{i} x_{i+1}}$ for $1 \leq i \leq n$, with $x_{n+1}=x_{1}$. The inequality then takes the form

$$
y_{1}^{2}+\cdots+y_{n}^{2} \geq y_{1} y_{2}+y_{2} y_{3}+\cdots+y_{n} y_{1} \text {. }
$$

But the inequality between the arithmetic and geometric mean yields

$$
\frac{1}{2}\left(y_{i}^{2}+y_{i+1}^{2}\right) \geq y_{i} y_{i+1}, \quad 1 \leq i \leq n,
$$

where $y_{n+1}=y_{n}$. Adding these $n$ inequalities yields the inequality (1).

The inequality (1) can also be obtained from the Cauchy-Schwarz inequality, which implies that $\sum_{i=1}^{n} y_{i}^{2} \sum_{i=1}^{n} y_{i+1}^{2} \geq\left(\sum_{i=1}^{n} y_{i} y_{i+1}\right)^{2}$, which is exactly the stated inequality.


problem: On an infinite checkerboard, two players alternately mark one unmarked cell. One of them uses $\times$, the other $o$. The first who fills a $2 \times 2$ square with his symbols wins. Can the player who starts always win?

solution:
Divide the plane into dominoes in the way indicated by the thick lines in Figure 2. The second player can respond by marking the other cell of the same domino where the first player placed his mark. Since every $2 \times 2$ square contains one whole domino, the first player cannot win.

![](https://cdn.mathpix.com/cropped/2024_04_17_e2580b6720254e51741dg-4.jpg?height=320&width=320&top_left_y=2050&top_left_x=891)

Figure 2


problem: Using each of the eight digits $1,3,4,5,6,7,8$ and 9 exactly once, a three-digit number $A$, two twodigit numbers $B$ and $C, B<C$, and a one-digit number $D$ are formed. The numbers are such that $A+D=B+C=143$. In how many ways can this be done?

solution:
From $A=143-D$ and $1 \leq D \leq 9$, it follows that $134 \leq A \leq 142$. The hundreds digit of $A$ is therefore 1 , and the tens digit is either 3 or 4 . If the tens digit of $A$ is 4 , then the sum of the units digits of
$A$ and $D$ must be 3 , which is impossible, as the digits 0 and 2 are not among the eight digits given. Hence the first two digits of $A$ are uniquely determined as 1 and 3 . The sum of the units digits of $A$ and $D$ must be 13. This can be achieved in six different ways as $13=4+9=5+8=6+7=7+6=8+5=9+4$.

The sum of the units digits of $B$ and $C$ must again be 13, and as $B+C=143$, this must also be true for the tens digits. For each choice of the numbers $A$ and $D$, the remaining four digits form two pairs, both with the sum 13. The units digits of $B$ and $C$ may then be chosen in four ways. The tens digits are then uniquely determined by the remaining pair and the relation $B<C$. The total number of possibilities is therefore $6 \cdot 4=24$.


problem: The jury of an olympiad has 30 members in the beginning. Each member of the jury thinks that some of his colleagues are competent, while all the others are not, and these opinions do not change. At the beginning of every session a voting takes place, and those members who are not competent in the opinion of more than one half of the voters are excluded from the jury for the rest of the olympiad. Prove that after at most 15 sessions there will be no more exclusions. (Note that nobody votes about his own competence.)

solution:
First we note that if nobody is excluded in some session, then the situation becomes stable and nobody can be excluded in any later session.

We use induction to prove the slightly more general claim that if the jury has $2 n$ members, $n \geq 2$, then after at most $n$ sessions nobody will be excluded anymore. For $n=2$ the claim is obvious, since if some members are excluded in the first two sessions, there are at most two members left, and hence nobody is excluded in the third session.

Now assuming that the claim is true for $n \leq k-1$, suppose the jury has $2 k$ members, and consider the first session. If nobody is excluded, we are done. If a positive and even number of members are excluded, there will be $2 r$ members left with $r<k$, and by the induction hypotheses the jury will stabilize after at most $r$ more sessions, giving a total of at most $r+1 \leq k$ sessions, as required.

Finally suppose that an odd number of members are excluded in the first session. There are three alternatives:

(i) An even number of members are excluded in each of the next $m$ sessions, after which nobody is excluded. Then the number of members left is at most $2 k-1-2 m$. Hence $2 k-1-2 m \geq 1$, so that $k \geq m+1$. Hence the number of sessions is at most $k$.

(ii) An even number of members are excluded in each of the next $m$ sessions, after which an odd number of members greater than 1 are excluded. Then there are at most $2 k-1-2 m-3$ members left, and by the induction hypotheses, the jury will stabilize in no more than $k-m-2$ sessions. The total number of sessions is therefore $1+m+1+(k-m-2)=k$.

(iii) An even number of members are excluded in each of the next $m$ sessions, followed by a session where precisely one member $M$ is excluded. In this session, there were $2 r+1$ members present for some $r$, and $r+1$ of these voted for the exclusion of $M$. But then any member other than $M$ was thought to be incompetent by at most $r$ others. In the next session the jury will have $2 r$ members, and since the members do not change their sympathies, nobody can be excluded. Hence the situation is stable after $m+2$ sessions, and at least $1+2 m+1=2 m+2$ members have been excluded. But there must be at least 3 members left, for one member cannot be excluded from a jury of 2 members. Hence $2 m+2 \leq 2 k-3$, whence $m+2 \leq k$.

Thus the claim holds for $n=k$ also. We conclude that the claim holds for all $n \geq 2$.


problem: Four heaps contain 38, 45, 61, and 70 matches respectively. Two players take turns choosing any two of the heaps and take some non-zero number of matches from one heap and some non-zero number of matches from the other heap. The player who cannot make a move, loses. Which one of the players has a winning strategy?

solution: The first player wins by making moves so that the opponent must face positions of the form $(a, a, a, b)$, where $a \leq b$.


problem:
Is it possible to partition all positive integers into disjoint sets $A$ and $B$ such that

(i) no three numbers of $A$ form arithmetic progression,

(ii) no infinite non-constant arithmetic progression can be formed by numbers of $B$ ?

solution:
Let $\mathbb{N}$ denote the set of positive integers. There is a bijective function $f: \mathbb{N} \rightarrow \mathbb{N} \times \mathbb{N}$. Let $a_{0}=1$, and for $k \geq 1$, let $a_{k}$ be the least integer of the form $m+t n$ for some integer $t \geq 0$ where $f(k)=(m, n)$, such that $a_{k} \geq 2 a_{k-1}$. Let $A=\left\{a_{0}, a_{1}, \ldots\right\}$ and let $B=\mathbb{N} \backslash A$. We now show that $A$ and $B$ satisfy the given conditions.

(i) For any non-negative integers $i<j<k$, we have $a_{k} \geq a_{j+1} \geq 2 a_{j}$, and hence $a_{k}-a_{j} \geq a_{j}>a_{j}-a_{i}$. Thus $a_{i}, a_{j}$ and $a_{k}$ do not form an arithmetic progression, since this would mean that $a_{k}-a_{j}=a_{j}-a_{i}$. Hence no three numbers in $A$ form an arithmetic progression.

(ii) Consider an infinite arithmetic progression $m, m+n, m+2 n, \ldots$, with $m, n \in \mathbb{N}$. Then $m+n t=a_{k}$ for some integer $t \geq 0$, where $k=f^{-1}(m, n)$. Thus $a_{k}$ belongs to the arithmetic progression, but $a_{k} \notin B$. Hence $B$ does not contain any infinite non-constant arithmetic progression.