di-zhang-fdu/OlympiadExtended huggingface dataset:
Subfield: Algebra


Question: Let $a_{1}, a_{2}, \ldots, a_{100}$ be nonnegative real numbers such that $a_{1}^{2}+a_{2}^{2}+\ldots+a_{100}^{2}=1$. Prove that
$$
a_{1}^{2} a_{2}+a_{2}^{2} a_{3}+\ldots+a_{100}^{2} a_{1}<\frac{12}{25}
$$

Solution:
Let $S=\sum_{k=1}^{100} a_{k}^{2} a_{k+1}$. (As usual, we consider the indices modulo 100, e.g. we set $a_{101}=a_{1}$ and $a_{102}=a_{2}$.)

Applying the Cauchy-Schwarz inequality to sequences $\left(a_{k+1}\right)$ and $\left(a_{k}^{2}+2 a_{k+1} a_{k+2}\right)$, and then the AM-GM inequality to numbers $a_{k+1}^{2}$ and $a_{k+2}^{2}$,
$$
\begin{aligned}
(3 S)^{2} & =\left(\sum_{k=1}^{100} a_{k+1}\left(a_{k}^{2}+2 a_{k+1} a_{k+2}\right)\right)^{2} \leq\left(\sum_{k=1}^{100} a_{k+1}^{2}\right)\left(\sum_{k=1}^{100}\left(a_{k}^{2}+2 a_{k+1} a_{k+2}\right)^{2}\right) \\
& =1 \cdot \sum_{k=1}^{100}\left(a_{k}^{2}+2 a_{k+1} a_{k+2}\right)^{2}=\sum_{k=1}^{100}\left(a_{k}^{4}+4 a_{k}^{2} a_{k+1} a_{k+2}+4 a_{k+1}^{2} a_{k+2}^{2}\right) \\
& \leq \sum_{k=1}^{100}\left(a_{k}^{4}+2 a_{k}^{2}\left(a_{k+1}^{2}+a_{k+2}^{2}\right)+4 a_{k+1}^{2} a_{k+2}^{2}\right)=\sum_{k=1}^{100}\left(a_{k}^{4}+6 a_{k}^{2} a_{k+1}^{2}+2 a_{k}^{2} a_{k+2}^{2}\right) .
\end{aligned}
$$
Applying the trivial estimates
$$
\sum_{k=1}^{100}\left(a_{k}^{4}+2 a_{k}^{2} a_{k+1}^{2}+2 a_{k}^{2} a_{k+2}^{2}\right) \leq\left(\sum_{k=1}^{100} a_{k}^{2}\right)^{2} \quad \text { and } \quad \sum_{k=1}^{100} a_{k}^{2} a_{k+1}^{2} \leq\left(\sum_{i=1}^{50} a_{2 i-1}^{2}\right)\left(\sum_{j=1}^{50} a_{2 j}^{2}\right)
$$
we obtain that
$$
(3 S)^{2} \leq\left(\sum_{k=1}^{100} a_{k}^{2}\right)^{2}+4\left(\sum_{i=1}^{50} a_{2 i-1}^{2}\right)\left(\sum_{j=1}^{50} a_{2 j}^{2}\right) \leq 1+\left(\sum_{i=1}^{50} a_{2 i-1}^{2}+\sum_{j=1}^{50} a_{2 j}^{2}\right)^{2}=2,
$$
hence
$$
S \leq \frac{\sqrt{2}}{3} \approx 0.4714<\frac{12}{25}=0.48
$$
Subfield: Combinatorics


Question: Find all positive integers $n$, for which the numbers in the set $S=\{1,2, \ldots, n\}$ can be colored red and blue, with the following condition being satisfied: the set $S \times S \times S$ contains exactly 2007 ordered triples $(x, y, z)$ such that (i) $x, y, z$ are of the same color and (ii) $x+y+z$ is divisible by $n$.

Solution:
Suppose that the numbers $1,2, \ldots, n$ are colored red and blue. Denote by $R$ and $B$ the sets of red and blue numbers, respectively; let $|R|=r$ and $|B|=b=n-r$. Call a triple $(x, y, z) \in S \times S \times S$ monochromatic if $x, y, z$ have the same color, and bichromatic otherwise. Call a triple $(x, y, z)$ divisible if $x+y+z$ is divisible by $n$. We claim that there are exactly $r^{2}-r b+b^{2}$ divisible monochromatic triples.

For any pair $(x, y) \in S \times S$ there exists a unique $z_{x, y} \in S$ such that the triple $\left(x, y, z_{x, y}\right)$ is divisible; so there are exactly $n^{2}$ divisible triples. Furthermore, if a divisible triple $(x, y, z)$ is bichromatic, then among $x, y, z$ there are either one blue and two red numbers, or vice versa. In both cases, exactly one of the pairs $(x, y),(y, z)$ and $(z, x)$ belongs to the set $R \times B$. Assign such pair to the triple $(x, y, z)$.

Conversely, consider any pair $(x, y) \in R \times B$, and denote $z=z_{x, y}$. Since $x \neq y$, the triples $(x, y, z),(y, z, x)$ and $(z, x, y)$ are distinct, and $(x, y)$ is assigned to each of them. On the other hand, if $(x, y)$ is assigned to some triple, then this triple is clearly one of those mentioned above. So each pair in $R \times B$ is assigned exactly three times.

Thus, the number of bichromatic divisible triples is three times the number of elements in $R \times B$, and the number of monochromatic ones is $n^{2}-3 r b=(r+b)^{2}-3 r b=r^{2}-r b+b^{2}$, as claimed.

So, to find all values of $n$ for which the desired coloring is possible, we have to find all $n$, for which there exists a decomposition $n=r+b$ with $r^{2}-r b+b^{2}=2007$. Therefore, $9 \mid r^{2}-r b+b^{2}=(r+b)^{2}-3 r b$. From this it consequently follows that $3|r+b, 3| r b$, and then $3|r, 3| b$. Set $r=3 s, b=3 c$. We can assume that $s \geq c$. We have $s^{2}-s c+c^{2}=223$.

Furthermore,
$$
892=4\left(s^{2}-s c+c^{2}\right)=(2 c-s)^{2}+3 s^{2} \geq 3 s^{2} \geq 3 s^{2}-3 c(s-c)=3\left(s^{2}-s c+c^{2}\right)=669
$$
so $297 \geq s^{2} \geq 223$ and $17 \geq s \geq 15$. If $s=15$ then
$$
c(15-c)=c(s-c)=s^{2}-\left(s^{2}-s c+c^{2}\right)=15^{2}-223=2
$$
which is impossible for an integer $c$. In a similar way, if $s=16$ then $c(16-c)=33$, which is also impossible. Finally, if $s=17$ then $c(17-c)=66$, and the solutions are $c=6$ and $c=11$. Hence, $(r, b)=(51,18)$ or $(r, b)=(51,33)$, and the possible values of $n$ are $n=51+18=69$ and $n=51+33=84$.

Final answer: $69$,$84$
Subfield: Combinatorics


Question: Given a convex $n$-gon $P$ in the plane. For every three vertices of $P$, consider the triangle determined by them. Call such a triangle good if all its sides are of unit length.

Prove that there are not more than $\frac{2}{3} n$ good triangles.

Solution:
Consider all good triangles containing a certain vertex $A$. The other two vertices of any such triangle lie on the circle $\omega_{A}$ with unit radius and center $A$. Since $P$ is convex, all these vertices lie on an arc of angle less than $180^{\circ}$. Let $L_{A} R_{A}$ be the shortest such arc, oriented clockwise (see Figure 1). Each of segments $A L_{A}$ and $A R_{A}$ belongs to a unique good triangle. We say that the good triangle with side $A L_{A}$ is assigned counterclockwise to $A$, and the second one, with side $A R_{A}$, is assigned clockwise to $A$. In those cases when there is a single good triangle containing vertex $A$, this triangle is assigned to $A$ twice.

There are at most two assignments to each vertex of the polygon. (Vertices which do not belong to any good triangle have no assignment.) So the number of assignments is at most $2 n$.

Consider an arbitrary good triangle $A B C$, with vertices arranged clockwise. We prove that $A B C$ is assigned to its vertices at least three times. Then, denoting the number of good triangles by $t$, we obtain that the number $K$ of all assignments is at most $2 n$, while it is not less than $3 t$. Then $3 t \leq K \leq 2 n$, as required.

Actually, we prove that triangle $A B C$ is assigned either counterclockwise to $C$ or clockwise to $B$. Then, by the cyclic symmetry of the vertices, we obtain that triangle $A B C$ is assigned either counterclockwise to $A$ or clockwise to $C$, and either counterclockwise to $B$ or clockwise to $A$, providing the claim.
<img_3648>

Figure 1

<img_4050>

Figure 2

Assume, to the contrary, that $L_{C} \neq A$ and $R_{B} \neq A$. Denote by $A^{\prime}, B^{\prime}, C^{\prime}$ the intersection points of circles $\omega_{A}, \omega_{B}$ and $\omega_{C}$, distinct from $A, B, C$ (see Figure 2). Let $C L_{C} L_{C}^{\prime}$ be the good triangle containing $C L_{C}$. Observe that the angle of arc $L_{C} A$ is less than $120^{\circ}$. Then one of the points $L_{C}$ and $L_{C}^{\prime}$ belongs to $\operatorname{arc} B^{\prime} A$ of $\omega_{C}$; let this point be $X$. In the case when $L_{C}=B^{\prime}$ and $L_{C}^{\prime}=A$, choose $X=B^{\prime}$.

Analogously, considering the good triangle $B R_{B}^{\prime} R_{B}$ which contains $B R_{B}$ as an edge, we see that one of the points $R_{B}$ and $R_{B}^{\prime}$ lies on $\operatorname{arc} A C^{\prime}$ of $\omega_{B}$. Denote this point by $Y, Y \neq A$. Then angles $X A Y, Y A B, B A C$ and $C A X$ (oriented clockwise) are not greater than $180^{\circ}$. Hence, point $A$ lies in quadrilateral $X Y B C$ (either in its interior or on segment $X Y$ ). This is impossible, since all these five points are vertices of $P$.

Hence, each good triangle has at least three assignments, and the statement is proved.
Subfield: Geometry


Question: In triangle $A B C$, the angle bisector at vertex $C$ intersects the circumcircle and the perpendicular bisectors of sides $B C$ and $C A$ at points $R, P$, and $Q$, respectively. The midpoints of $B C$ and $C A$ are $S$ and $T$, respectively. Prove that triangles $R Q T$ and $R P S$ have the same area.

Solution:
. If $A C=B C$ then triangle $A B C$ is isosceles, triangles $R Q T$ and $R P S$ are symmetric about the bisector $C R$ and the statement is trivial. If $A C \neq B C$ then it can be assumed without loss of generality that $A C<B C$.

<img_3740>

Denote the circumcenter by $O$. The right triangles $C T Q$ and $C S P$ have equal angles at vertex $C$, so they are similar, $\angle C P S=\angle C Q T=\angle O Q P$ and
$$
\frac{Q T}{P S}=\frac{C Q}{C P}
$$
Let $\ell$ be the perpendicular bisector of chord $C R$; of course, $\ell$ passes through the circumcenter $O$. Due to the equal angles at $P$ and $Q$, triangle $O P Q$ is isosceles with $O P=O Q$. Then line $\ell$ is the axis of symmetry in this triangle as well. Therefore, points $P$ and $Q$ lie symmetrically on line segment $C R$,
$$
R P=C Q \quad \text { and } \quad R Q=C P .
$$
Triangles $R Q T$ and $R P S$ have equal angles at vertices $Q$ and $P$, respectively. Then
$$
\frac{\operatorname{area}(R Q T)}{\operatorname{area}(R P S)}=\frac{\frac{1}{2} \cdot R Q \cdot Q T \cdot \sin \angle R Q T}{\frac{1}{2} \cdot R P \cdot P S \cdot \sin \angle R P S}=\frac{R Q}{R P} \cdot \frac{Q T}{P S}
$$
Substituting (1) and (2),
$$
\frac{\operatorname{area}(R Q T)}{\operatorname{area}(R P S)}=\frac{R Q}{R P} \cdot \frac{Q T}{P S}=\frac{C P}{C Q} \cdot \frac{C Q}{C P}=1
$$
Hence, $\operatorname{area}(R Q T)=\operatorname{area}(R S P)$.
. Assume again $A C<B C$. Denote the circumcenter by $O$, and let $\gamma$ be the angle at $C$. Similarly to the first solution, from right triangles $C T Q$ and $C S P$ we obtain that $\angle O P Q=\angle O Q P=90^{\circ}-\frac{\gamma}{2}$. Then triangle $O P Q$ is isosceles, $O P=O Q$ and moreover $\angle P O Q=\gamma$.

As is well-known, point $R$ is the midpoint of arc $A B$ and $\angle R O A=\angle B O R=\gamma$.

<img_3507>

Consider the rotation around point $O$ by angle $\gamma$. This transform moves $A$ to $R, R$ to $B$ and $Q$ to $P$; hence triangles $R Q A$ and $B P R$ are congruent and they have the same area.

Triangles $R Q T$ and $R Q A$ have $R Q$ as a common side, so the ratio between their areas is
$$
\frac{\operatorname{area}(R Q T)}{\operatorname{area}(R Q A)}=\frac{d(T, C R)}{d(A, C R)}=\frac{C T}{C A}=\frac{1}{2}
$$
$(d(X, Y Z)$ denotes the distance between point $X$ and line $Y Z)$.

It can be obtained similarly that
$$
\frac{\operatorname{area}(R P S)}{\operatorname{area}(B P R)}=\frac{C S}{C B}=\frac{1}{2}
$$
Now the proof can be completed as
$$
\operatorname{area}(R Q T)=\frac{1}{2} \operatorname{area}(R Q A)=\frac{1}{2} \operatorname{area}(B P R)=\operatorname{area}(R P S)
$$
Subfield: Geometry


Question: Given an isosceles triangle $A B C$ with $A B=A C$. The midpoint of side $B C$ is denoted by $M$. Let $X$ be a variable point on the shorter arc $M A$ of the circumcircle of triangle $A B M$. Let $T$ be the point in the angle domain $B M A$, for which $\angle T M X=90^{\circ}$ and $T X=B X$. Prove that $\angle M T B-\angle C T M$ does not depend on $X$.

Solution:
. Let $N$ be the midpoint of segment $B T$ (see Figure 1). Line $X N$ is the axis of symmetry in the isosceles triangle $B X T$, thus $\angle T N X=90^{\circ}$ and $\angle B X N=\angle N X T$. Moreover, in triangle $B C T$, line $M N$ is the midline parallel to $C T$; hence $\angle C T M=\angle N M T$.

Due to the right angles at points $M$ and $N$, these points lie on the circle with diameter $X T$. Therefore,
$$
\angle M T B=\angle M T N=\angle M X N \quad \text { and } \quad \angle C T M=\angle N M T=\angle N X T=\angle B X N .
$$
Hence
$$
\angle M T B-\angle C T M=\angle M X N-\angle B X N=\angle M X B=\angle M A B
$$
which does not depend on $X$.

<img_3916>

Figure 1

<img_3968>

Figure 2
. Let $S$ be the reflection of point $T$ over $M$ (see Figure 2). Then $X M$ is the perpendicular bisector of $T S$, hence $X B=X T=X S$, and $X$ is the circumcenter of triangle $B S T$. Moreover, $\angle B S M=\angle C T M$ since they are symmetrical about $M$. Then
$$
\angle M T B-\angle C T M=\angle S T B-\angle B S T=\frac{\angle S X B-\angle B X T}{2} .
$$
Observe that $\angle S X B=\angle S X T-\angle B X T=2 \angle M X T-\angle B X T$, so
$$
\angle M T B-\angle C T M=\frac{2 \angle M X T-2 \angle B X T}{2}=\angle M X B=\angle M A B
$$
which is constant.
Subfield: Geometry


Question: The diagonals of a trapezoid $A B C D$ intersect at point $P$. Point $Q$ lies between the parallel lines $B C$ and $A D$ such that $\angle A Q D=\angle C Q B$, and line $C D$ separates points $P$ and $Q$. Prove that $\angle B Q P=\angle D A Q$.

Solution:
Let $t=\frac{A D}{B C}$. Consider the homothety $h$ with center $P$ and scale $-t$. Triangles $P D A$ and $P B C$ are similar with ratio $t$, hence $h(B)=D$ and $h(C)=A$.

<img_3204>

Let $Q^{\prime}=h(Q)$ (see Figure 1). Then points $Q, P$ and $Q^{\prime}$ are obviously collinear. Points $Q$ and $P$ lie on the same side of $A D$, as well as on the same side of $B C$; hence $Q^{\prime}$ and $P$ are also on the same side of $h(B C)=A D$, and therefore $Q$ and $Q^{\prime}$ are on the same side of $A D$. Moreover, points $Q$ and $C$ are on the same side of $B D$, while $Q^{\prime}$ and $A$ are on the opposite side (see Figure above).

By the homothety, $\angle A Q^{\prime} D=\angle C Q B=\angle A Q D$, hence quadrilateral $A Q^{\prime} Q D$ is cyclic. Then
$$
\angle D A Q=\angle D Q^{\prime} Q=\angle D Q^{\prime} P=\angle B Q P
$$
(the latter equality is valid by the homothety again).
Subfield: Geometry


Question: Consider five points $A, B, C, D, E$ such that $A B C D$ is a parallelogram and $B C E D$ is a cyclic quadrilateral. Let $\ell$ be a line passing through $A$, and let $\ell$ intersect segment $D C$ and line $B C$ at points $F$ and $G$, respectively. Suppose that $E F=E G=E C$. Prove that $\ell$ is the bisector of angle $D A B$.

Solution:
If $C F=C G$, then $\angle F G C=\angle G F C$, hence $\angle G A B=\angle G F C=\angle F G C=\angle F A D$, and $\ell$ is a bisector.

Assume that $C F<G C$. Let $E K$ and $E L$ be the altitudes in the isosceles triangles $E C F$ and $E G C$, respectively. Then in the right triangles $E K F$ and $E L C$ we have $E F=E C$ and
$$
K F=\frac{C F}{2}<\frac{G C}{2}=L C
$$
So
$$
K E=\sqrt{E F^{2}-K F^{2}}>\sqrt{E C^{2}-L C^{2}}=L E .
$$
Since quadrilateral $B C E D$ is cyclic, we have $\angle E D C=\angle E B C$, so the right triangles $B E L$ and $D E K$ are similar. Then $K E>L E$ implies $D K>B L$, and hence
$$
D F=D K-K F>B L-L C=B C=A D .
$$
But triangles $A D F$ and $G C F$ are similar, so we have $1>\frac{A D}{D F}=\frac{G C}{C F}$; this contradicts our assumption.

The case $C F>G C$ is completely similar. We consequently obtain the converse inequalities $K F>L C, K E<L E, D K<B L, D F<A D$, hence $1<\frac{A D}{D F}=\frac{G C}{C F} ;$ a contradiction.

<img_3551>
Subfield: Geometry


Question: Point $P$ lies on side $A B$ of a convex quadrilateral $A B C D$. Let $\omega$ be the incircle of triangle $C P D$, and let $I$ be its incenter. Suppose that $\omega$ is tangent to the incircles of triangles $A P D$ and $B P C$ at points $K$ and $L$, respectively. Let lines $A C$ and $B D$ meet at $E$, and let lines $A K$ and $B L$ meet at $F$. Prove that points $E, I$, and $F$ are collinear.

Solution:
Let $\Omega$ be the circle tangent to segment $A B$ and to rays $A D$ and $B C$; let $J$ be its center. We prove that points $E$ and $F$ lie on line $I J$.

<img_3818>

Denote the incircles of triangles $A D P$ and $B C P$ by $\omega_{A}$ and $\omega_{B}$. Let $h_{1}$ be the homothety with a negative scale taking $\omega$ to $\Omega$. Consider this homothety as the composition of two homotheties: one taking $\omega$ to $\omega_{A}$ (with a negative scale and center $K$ ), and another one taking $\omega_{A}$ to $\Omega$ (with a positive scale and center $A$ ). It is known that in such a case the three centers of homothety are collinear (this theorem is also referred to as the theorem on the three similitude centers). Hence, the center of $h_{1}$ lies on line $A K$. Analogously, it also lies on $B L$, so this center is $F$. Hence, $F$ lies on the line of centers of $\omega$ and $\Omega$, i. e. on $I J$ (if $I=J$, then $F=I$ as well, and the claim is obvious).

Consider quadrilateral $A P C D$ and mark the equal segments of tangents to $\omega$ and $\omega_{A}$ (see the figure below to the left). Since circles $\omega$ and $\omega_{A}$ have a common point of tangency with $P D$, one can easily see that $A D+P C=A P+C D$. So, quadrilateral $A P C D$ is circumscribed; analogously, circumscribed is also quadrilateral $B C D P$. Let $\Omega_{A}$ and $\Omega_{B}$ respectively be their incircles.
<img_3617>



Consider the homothety $h_{2}$ with a positive scale taking $\omega$ to $\Omega$. Consider $h_{2}$ as the composition of two homotheties: taking $\omega$ to $\Omega_{A}$ (with a positive scale and center $C$ ), and taking $\Omega_{A}$ to $\Omega$ (with a positive scale and center $A$ ), respectively. So the center of $h_{2}$ lies on line $A C$. By analogous reasons, it lies also on $B D$, hence this center is $E$. Thus, $E$ also lies on the line of centers $I J$, and the claim is proved.
Subfield: Number Theory


Question: Find all pairs $(k, n)$ of positive integers for which $7^{k}-3^{n}$ divides $k^{4}+n^{2}$.

Solution:
Suppose that a pair $(k, n)$ satisfies the condition of the problem. Since $7^{k}-3^{n}$ is even, $k^{4}+n^{2}$ is also even, hence $k$ and $n$ have the same parity. If $k$ and $n$ are odd, then $k^{4}+n^{2} \equiv 1+1=2(\bmod 4)$, while $7^{k}-3^{n} \equiv 7-3 \equiv 0(\bmod 4)$, so $k^{4}+n^{2}$ cannot be divisible by $7^{k}-3^{n}$. Hence, both $k$ and $n$ must be even.

Write $k=2 a, n=2 b$. Then $7^{k}-3^{n}=7^{2 a}-3^{2 b}=\frac{7^{a}-3^{b}}{2} \cdot 2\left(7^{a}+3^{b}\right)$, and both factors are integers. So $2\left(7^{a}+3^{b}\right) \mid 7^{k}-3^{n}$ and $7^{k}-3^{n} \mid k^{4}+n^{2}=2\left(8 a^{4}+2 b^{2}\right)$, hence
$$
7^{a}+3^{b} \leq 8 a^{4}+2 b^{2}
$$
We prove by induction that $8 a^{4}<7^{a}$ for $a \geq 4,2 b^{2}<3^{b}$ for $b \geq 1$ and $2 b^{2}+9 \leq 3^{b}$ for $b \geq 3$. In the initial cases $a=4, b=1, b=2$ and $b=3$ we have $8 \cdot 4^{4}=2048<7^{4}=2401,2<3$, $2 \cdot 2^{2}=8<3^{2}=9$ and $2 \cdot 3^{2}+9=3^{3}=27$, respectively.

If $8 a^{4}<7^{a}(a \geq 4)$ and $2 b^{2}+9 \leq 3^{b}(b \geq 3)$, then
$$
\begin{aligned}
8(a+1)^{4} & =8 a^{4}\left(\frac{a+1}{a}\right)^{4}<7^{a}\left(\frac{5}{4}\right)^{4}=7^{a} \frac{625}{256}<7^{a+1} \quad \text { and } \\
2(b+1)^{2}+9 & <\left(2 b^{2}+9\right)\left(\frac{b+1}{b}\right)^{2} \leq 3^{b}\left(\frac{4}{3}\right)^{2}=3^{b} \frac{16}{9}<3^{b+1},
\end{aligned}
$$
as desired.

For $a \geq 4$ we obtain $7^{a}+3^{b}>8 a^{4}+2 b^{2}$ and inequality (1) cannot hold. Hence $a \leq 3$, and three cases are possible.

Case 1: $a=1$. Then $k=2$ and $8+2 b^{2} \geq 7+3^{b}$, thus $2 b^{2}+1 \geq 3^{b}$. This is possible only if $b \leq 2$. If $b=1$ then $n=2$ and $\frac{k^{4}+n^{2}}{7^{k}-3^{n}}=\frac{2^{4}+2^{2}}{7^{2}-3^{2}}=\frac{1}{2}$, which is not an integer. If $b=2$ then $n=4$ and $\frac{k^{4}+n^{2}}{7^{k}-3^{n}}=\frac{2^{4}+4^{2}}{7^{2}-3^{4}}=-1$, so $(k, n)=(2,4)$ is a solution.

Case 2: $a=2$. Then $k=4$ and $k^{4}+n^{2}=256+4 b^{2} \geq\left|7^{4}-3^{n}\right|=\left|49-3^{b}\right| \cdot\left(49+3^{b}\right)$. The smallest value of the first factor is 22 , attained at $b=3$, so $128+2 b^{2} \geq 11\left(49+3^{b}\right)$, which is impossible since $3^{b}>2 b^{2}$.

Case 3: $a=3$. Then $k=6$ and $k^{4}+n^{2}=1296+4 b^{2} \geq\left|7^{6}-3^{n}\right|=\left|343-3^{b}\right| \cdot\left(343+3^{b}\right)$. Analogously, $\left|343-3^{b}\right| \geq 100$ and we have $324+b^{2} \geq 25\left(343+3^{b}\right)$, which is impossible again.

We find that there exists a unique solution $(k, n)=(2,4)$.

Final answer: $(2,4)$
Subfield: Number Theory


Question: Let $b, n>1$ be integers. Suppose that for each $k>1$ there exists an integer $a_{k}$ such that $b-a_{k}^{n}$ is divisible by $k$. Prove that $b=A^{n}$ for some integer $A$.

Solution:
Let the prime factorization of $b$ be $b=p_{1}^{\alpha_{1}} \ldots p_{s}^{\alpha_{s}}$, where $p_{1}, \ldots, p_{s}$ are distinct primes. Our goal is to show that all exponents $\alpha_{i}$ are divisible by $n$, then we can set $A=p_{1}^{\alpha_{1} / n} \ldots p_{s}^{\alpha_{s} / n}$.

Apply the condition for $k=b^{2}$. The number $b-a_{k}^{n}$ is divisible by $b^{2}$ and hence, for each $1 \leq i \leq s$, it is divisible by $p_{i}^{2 \alpha_{i}}>p_{i}^{\alpha_{i}}$ as well. Therefore
$$
a_{k}^{n} \equiv b \equiv 0 \quad\left(\bmod p_{i}^{\alpha_{i}}\right)
$$
and
$$
a_{k}^{n} \equiv b \not \equiv 0 \quad\left(\bmod p_{i}^{\alpha_{i}+1}\right)
$$
which implies that the largest power of $p_{i}$ dividing $a_{k}^{n}$ is $p_{i}^{\alpha_{i}}$. Since $a_{k}^{n}$ is a complete $n$th power, this implies that $\alpha_{i}$ is divisible by $n$.
Subfield: Number Theory


Question: Let $k$ be a positive integer. Prove that the number $\left(4 k^{2}-1\right)^{2}$ has a positive divisor of the form $8 k n-1$ if and only if $k$ is even.

Solution:
The statement follows from the following fact.

Lemma. For arbitrary positive integers $x$ and $y$, the number $4 x y-1$ divides $\left(4 x^{2}-1\right)^{2}$ if and only if $x=y$.

Proof. If $x=y$ then $4 x y-1=4 x^{2}-1$ obviously divides $\left(4 x^{2}-1\right)^{2}$ so it is sufficient to consider the opposite direction.

Call a pair $(x, y)$ of positive integers bad if $4 x y-1$ divides $\left(4 x^{2}-1\right)^{2}$ but $x \neq y$. In order to prove that bad pairs do not exist, we present two properties of them which provide an infinite descent.

Property (i). If $(x, y)$ is a bad pair and $x<y$ then there exists a positive integer $z<x$ such that $(x, z)$ is also bad.

Let $r=\frac{\left(4 x^{2}-1\right)^{2}}{4 x y-1}$. Then
$$
r=-r \cdot(-1) \equiv-r(4 x y-1)=-\left(4 x^{2}-1\right)^{2} \equiv-1 \quad(\bmod 4 x)
$$
and $r=4 x z-1$ with some positive integer $z$. From $x<y$ we obtain that
$$
4 x z-1=\frac{\left(4 x^{2}-1\right)^{2}}{4 x y-1}<4 x^{2}-1
$$
and therefore $z<x$. By the construction, the number $4 x z-1$ is a divisor of $\left(4 x^{2}-1\right)^{2}$ so $(x, z)$ is a bad pair.

Property (ii). If $(x, y)$ is a bad pair then $(y, x)$ is also bad.

Since $1=1^{2} \equiv(4 x y)^{2}(\bmod 4 x y-1)$, we have
$$
\left(4 y^{2}-1\right)^{2} \equiv\left(4 y^{2}-(4 x y)^{2}\right)^{2}=16 y^{4}\left(4 x^{2}-1\right)^{2} \equiv 0 \quad(\bmod 4 x y-1)
$$
Hence, the number $4 x y-1$ divides $\left(4 y^{2}-1\right)^{2}$ as well.

Now suppose that there exists at least one bad pair. Take a bad pair $(x, y)$ such that $2 x+y$ attains its smallest possible value. If $x<y$ then property (i) provides a bad pair $(x, z)$ with $z<y$ and thus $2 x+z<2 x+y$. Otherwise, if $y<x$, property (ii) yields that pair $(y, x)$ is also bad while $2 y+x<2 x+y$. Both cases contradict the assumption that $2 x+y$ is minimal; the Lemma is proved.

To prove the problem statement, apply the Lemma for $x=k$ and $y=2 n$; the number $8 k n-1$ divides $\left(4 k^{2}-1\right)^{2}$ if and only if $k=2 n$. Hence, there is no such $n$ if $k$ is odd and $n=k / 2$ is the only solution if $k$ is even.