problem: Determine all prime numbers $p$ and all positive integers $x$ and $y$ satisfying $x^{3}+y^{3}=$ $p(x y+p)$.

solution:
. Up to a swap of the first two entries, the only solutions are $(x, y, p)=(1,8,19)$, $(x, y, p)=(2,7,13)$ and $(x, y, p)=(4,5,7)$. The verification is routine.

Set $s=x+y$. Rewrite the equation in the form $s\left(s^{2}-3 x y\right)=p(p+x y)$, and express $x y$ :

$$
x y=\frac{s^{3}-p^{2}}{3 s+p}
$$

In particular,

$$
s^{2} \geq 4 x y=\frac{4\left(s^{3}-p^{2}\right)}{3 s+p}
$$

or

$$
(s-2 p)\left(s^{2}+s p+2 p^{2}\right) \leq p^{2}-p^{3}<0
$$

so $s<2 p$.
If $p \mid s$, then $s=p$ and $x y=p(p-1) / 4$ which is impossible for $x+y=p$ (the equation $t^{2}-p t+p(p-1) / 4=0$ has no integer solutions).

If $p \nmid s$, rewrite $(*)$ in the form

$$
27 x y=\left(9 s^{2}-3 s p+p^{2}\right)-\frac{p^{2}(p+27)}{3 s+p}
$$

Since $p \nmid s$, this could be integer only if $3 s+p \mid$ $p+27$, and hence $3 s+p \mid 27-s$.

If $s \neq 9$, then $|3 s-27| \geq 3 s+p$, so $27-3 s \geq$ $3 s+p$, or $27-p \geq 6 s$, whence $s \leq 4$. These cases are ruled out by hand.

If $s=x+y=9$, then $(*)$ yields $x y=27-p$. Up to a swap of $x$ and $y$, all such triples $(x, y, p)$ are $(1,8,19),(2,7,13)$, and $(4,5,7)$.

problem_match: Problem 1.

solution_match: Solution 1


solution:
. Set again $s=x+y$. It is readily checked that $s \leq 8$ provides no solutions, so assume $s \geq 9$. Notice that $x^{3}+y^{3}=s\left(x^{2}-x y+y^{2}\right) \geq$ $\frac{1}{4} s^{3}$ and $x y \leq \frac{1}{4} s^{2}$. The condition in the statement then implies $s^{2}(s-p) \leq 4 p^{2}$, so $s<p+4$.

Notice that $p$ divides one of $s$ and $x^{2}-x y+y^{2}$. The case $p \mid s$ is easily ruled out by the condition $s<p+4$ : The latter forces $s=p$,

## Serbia, Dushan DuUkitch

so $x^{2}-x y+y^{2}=x y+p$, i. e., $(x-y)^{2}=p$, which is impossible.

Hence $p \mid x^{2}-x y+y^{2}$, so $x^{2}-x y+y^{2}=k p$ and $x y+p=k s$ for some positive integer $k$, implying

$$
s^{2}+3 p=k(3 s+p)
$$

Recall that $p \nmid s$ to infer that $3 k \equiv s(\bmod p)$. We now present two approaches.
1st Approach. Write $3 k=s+m p$ for some integer $m$ and plug $k=\frac{1}{3}(s+m p)$ into ( $\left.* *\right)$ to get $s=(9-m p) /(3 m+1)$. The condition $s \geq 9$ then forces $m=0$, so $s=9$, in which case, up to a swap of the first two entries, the solutions turn out to be $(x, y, p)=(1,8,19),(x, y, p)=(2,7,13)$ and $(x, y, p)=(4,5,7)$.
2nd Approach. Notice that $k=\frac{s^{2}+3 p}{3 s+p}=3+$ $\frac{s(s-9)}{3 s+p} \leq 3+\frac{1}{3}(s-9)=\frac{1}{3} s \leq \frac{1}{3}(p+3)$, since $s<p+4$. Hence $3 k \leq p+3$, and the congruence $3 k \equiv s$ $(\bmod p)$ then forces either $3 k=s-p$ or $3 k=s$.

The case $3 k=s-p$ is easily ruled out: Otherwise, $(* *)$ boils down to $2 s+p+9=0$, which is clearly impossible.

Finally, if $3 k=s$, then $(* *)$ reduces to $s=9$. In this case, up to a swap of the first two entries, the only solutions are $(x, y, p)=(1,8,19)$, $(x, y, p)=(2,7,13)$ and $(x, y, p)=(4,5,7)$.

Remark. The upper bound for $k$ can equally well be established by considering the variation of $\left(s^{2}+3 p\right) /(3 s+p)$ for $1 \leq s \leq p+3$. The maximum is achieved at $s=p+3$ :

$$
\begin{array}{r}
\max _{1 \leq s \leq p+3} \frac{s^{2}+3 p}{3 s+p}=\frac{(p+3)^{2}+3 p}{3(p+3)+p}=\frac{p^{2}+9 p+9}{4 p+9} \\
<\frac{p+4}{3}
\end{array}
$$

so the integer $3 k \leq p+3<p+9 \leq p+s$ and the remainder of the proof now goes along the few final lines above.

#### Abstract

solution_match: Solution 2


problem:
Fix an integer $n \geqslant 3$. Let $\mathcal{S}$ be a set of $n$ points in the plane, no three of which are collinear. Given different points $A, B, C$ in $\mathcal{S}$, the triangle $A B C$ is nice for $A B$ if Area $(A B C) \leqslant \operatorname{Area}(A B X)$ for all $X$ in $\mathcal{S}$ different from $A$ and $B$. (Note that for a segment $A B$ there could be several nice triangles.) A triangle is beautiful if its vertices are all in $\mathcal{S}$ and it is nice for at least two of its sides.

Prove that there are at least $\frac{1}{2}(n-1)$ beautiful triangles.

# Bulgaria, Alexander Ivanov

solution:
For convenience, a triangle whose vertices all lie in $\mathcal{S}$ will be referred to as a triangle in $\mathcal{S}$. The argument hinges on the following observation:

Given any partition of $\mathcal{S}$, amongst all triangles in $\mathcal{S}$ with at least one vertex in each part, those of minimal area are all adequate.

Indeed, amongst the triangles under consideration, one of minimal area is suitable for both sides with endpoints in different parts.

We now present two approaches for the lower bound.
1st Approach. By the above observation, the 3uniform hypergraph of adequate triangles is connected. It is a well-known fact that such a hypergraph has at least $\frac{1}{2}(n-1)$ hyperedges, whence the required lower bound
2nd Approach. For a partition $\mathcal{S}=\mathcal{A} \sqcup \mathcal{B}$, an area minimising triangle as above will be called $(\mathcal{A}, \mathcal{B})$ minimal. Thus, $(\mathcal{A}, \mathcal{B})$-minimal triangles are all adequate.

Consider now a partition of $\mathcal{S}=\mathcal{A} \sqcup \mathcal{B}$, where $|\mathcal{A}|=1$. Choose an $(\mathcal{A}, \mathcal{B})$-minimal triangle and add to $\mathcal{A}$ its vertices from $\mathcal{B}$ to obtain a new partition also written $\mathcal{S}=\mathcal{A} \sqcup \mathcal{B}$. Continuing, choose an $(\mathcal{A}, \mathcal{B})$-minimal triangle and add to $\mathcal{A}$ its vertices/vertex from $\mathcal{B}$ and so on and so forth all the way down for at least another $\frac{1}{2}(n-5)$ steps - this works at least as many times, since at each step, $\mathcal{B}$ loses at most two points. Clearly, each step provides a new adequate triangle, so the overall number of adequate triangles is at least $\frac{1}{2}(n-1)$, as required.

Remark. In fact, $\lfloor n / 2\rfloor$ is the smallest possible number of adequate triangles, as shown by the the configurations described below.

Let first $n=2 k-1$. Consider a regular $n$-gon
$\mathcal{P}=A_{1} A_{2} \ldots A_{n}$. Choose a point $B_{i}$ on the perpendicular bisector of $A_{i} A_{i+1}$ outside $\mathcal{P}$ and sufficiently close to the segment $A_{i} A_{i+1}$. We claim that there are exactly $k-1=\lfloor n / 2\rfloor$ adequate triangles in the set

$$
\mathcal{S}=\left\{A_{1}, A_{2}, \ldots, A_{k}, B_{1}, B_{2}, \ldots, B_{k-1}\right\}
$$

Notice here that the arc $A_{1} A_{2} \ldots A_{k}$ is less than half of the circumcircle of $\mathcal{P}$, so the angles $\angle A_{u} A_{v} A_{w}$, $1 \leq u<v<w \leq k$, are all obtuse.
![](https://cdn.mathpix.com/cropped/2024_11_22_16f8cec3602404195736g-2.jpg?height=342&width=788&top_left_y=1185&top_left_x=1134)

To prove the claim, list the suitable triangles for each segment.

For segments $A_{i} A_{i+1}, A_{i} B_{i}$, and $B_{i} A_{i+1}$, it is $A_{i} B_{i} A_{i+1}$.

For segment $A_{i} A_{j+1}, j \geq i+1$, those are $A_{i} B_{i} A_{j+1}$ and $A_{i} B_{j} A_{j+1}$.

For segment $A_{i} B_{j}, j \geq i+1$, it is $A_{i} B_{i} B_{j}$.
For segment $B_{i} A_{j+1}, j \geq i+1$, it is $B_{i} B_{j} A_{j+1}$.
For segment $B_{i} B_{j}, i<j$, those are $B_{i} A_{i+1} B_{j}$ and $B_{i} A_{j} B_{j}$.

It is easily seen that the only triangles occurring twice are $A_{i} B_{i} A_{i+1}$, hence they are the only adequate triangles.

For $n=2 k-2$, just remove $A_{k}$ from the above example. This removes the adequate triangle $A_{k-1} B_{k-1} A_{k}$ and provides only one new such instead, namely, $B_{k-2} A_{k-1} B_{k-1}$. Consequently, there are exactly $k-1=\lfloor n / 2\rfloor$ adequate triangles in the set

$$
\mathcal{S}=\left\{A_{1}, A_{2}, \ldots, A_{k-1}, B_{1}, B_{2}, \ldots, B_{k-1}\right\}
$$

problem_match: Problem 2.

solution_match: Solution.


problem:
Let $n \geqslant 2$ be an integer, and let $f$ be a $4 n$-variable polynomial with real coefficients. Assume that, for any $2 n$ points $\left(x_{1}, y_{1}\right), \ldots,\left(x_{2 n}, y_{2 n}\right)$ in the plane, $f\left(x_{1}, y_{1}, \ldots, x_{2 n}, y_{2 n}\right)=0$ if and only if the points form the vertices of a regular $2 n$-gon in some order, or are all equal.

Determine the smallest possible degree of $f$.

solution:
The smallest possible degree is $2 n$. In what follows, we will frequently write $A_{i}=$ $\left(x_{i}, y_{i}\right)$, and abbreviate $P\left(x_{1}, y_{1}, \ldots, x_{2 n}, y_{2 n}\right)$ to $P\left(A_{1}, \ldots, A_{2 n}\right)$ or as a function of any $2 n$ points.

Suppose that $f$ is valid. First, we note a key property:

Claim (Sign of $f$ ). $f$ attains wither only nonnegative values, or only nonpositive values.

Proof. This follows from the fact that the zero-set of $f$ is very sparse: if $f$ takes on a positive and a negative value, we can move $A_{1}, \ldots, A_{2 n}$ from the negative value to the positive value without ever having them form a regular $2 n$-gon - a contradiction.

The strategy for showing $\operatorname{deg} f \geq 2 n$ is the following. We will animate the points $A_{1}, \ldots, A_{2 n}$ linearly in a variable $t$; then $g(t)=f\left(A_{1}, \ldots, A_{2 n}\right)$ will have degree at most $\operatorname{deg} f$ (assuming it is not zero). The claim above then establishes that any root of $g$ must be a multiple root, so if we can show that there are at least $n$ roots, we will have shown $\operatorname{deg} g \geq 2 n$, and so $\operatorname{deg} f \geq 2 n$.

Geometrically, our goal is to exhibit $2 n$ linearly moving points so that they form a regular $2 n$-gon a total of $n$ times, but not always form one.

We will do this as follows. Draw $n$ mirrors through the origin, as lines making angles of $\frac{\pi}{n}$ with each other. Then, any point $P$ has a total of $2 n$ reflections in the mirrors, as shown below for $n=5$. (Some of these reflections may overlap.)

Draw the $n$ angle bisectors of adjacent mirrors. Observe that the reflections of $P$ form a regular $2 n$ gon if and only if $P$ lies on one of the bisectors.

We will animate $P$ on any line $\ell$ which intersects all $n$ bisectors (but does not pass through the origin), and let $P_{1}, \ldots, P_{2 n}$ be its reflections. Clearly, these are also all linearly animated, and because of the reasons above, they will form a regular $2 n$-gon exactly $n$ times, when $\ell$ meets each bisector. So this establishes $\operatorname{deg} f \geq 2 n$ for the reasons described previously.

Now we pass to constructing a polynomial $f$ of degree $2 n$ having the desired property. First of all, we will instead find a polynomial $g$ which has this property, but only when points with sum zero are input. This still solves the problem, because then
we can choose

$$
f\left(A_{1}, A_{2}, \ldots, A_{2 n}\right)=g\left(A_{1}-\bar{A}, \ldots, A_{2 n}-\bar{A}\right)
$$

where $\bar{A}$ is the centroid of $A_{1}, \ldots, A_{2 n}$. This has the upshot that we can now always assume $A_{1}+\cdots+A_{2 n}=0$, which will simplify the ensuing discussion.
![](https://cdn.mathpix.com/cropped/2024_11_22_16f8cec3602404195736g-3.jpg?height=1289&width=826&top_left_y=880&top_left_x=1089)

We will now construct a suitable $g$ as a sum of squares. This means that, if we write $g=g_{1}^{2}+g_{2}^{2}+$ $\cdots+g_{m}^{2}$, then $g=0$ if and only if $g_{1}=\cdots=g_{m}=0$, and that if their degrees are $d_{1}, \ldots, d_{m}$, then $g$ has degree at most $2 \max \left(d_{1}, \ldots, d_{m}\right)$.

Thus, it is sufficient to exhibit several polynomials, all of degree at most $n$, such that $2 n$ points with zero sum are the vertices of a regular $2 n$-gon if and only if the polynomials are all zero at those points.

First, we will impose the constraints that all $\left|A_{i}\right|^{2}=x_{i}^{2}+y_{i}^{2}$ are equal. This uses multiple degree 2 constraints.

Now, we may assume that the points $A_{1}, \ldots, A_{2 n}$ all lie on a circle with centre 0 , and $A_{1}+\cdots+A_{2 n}=0$. If this circle has radius 0 , then all $A_{i}$ coincide, and we may ignore this case.

Otherwise, the circle has positive radius. We will use the following lemma.
Lemma. Suppose that $a_{1}, \ldots, a_{2 n}$ are complex numbers of the same non-zero magnitude, and suppose that $a_{1}^{k}+\cdots+a_{2 n}^{k}=0, k=1, \ldots, n$. Then $a_{1}, \ldots, a_{2 n}$ form a regular $2 n$-gon centred at the origin. (Conversely, this is easily seen to be sufficient.)
Proof. Since all the hypotheses are homogenous, we may assume (mostly for convenience) that $a_{1}, \ldots, a_{2 n}$ lie on the unit circle. By Newton's sums, the $k$-th symmetric sums of $a_{1}, \ldots, a_{2 n}$ are all zero for $k$ in the range $1, \ldots, n$.

Taking conjugates yields $a_{1}^{-k}+\cdots+a_{2 n}^{-k}=0$, $k=1, \ldots, n$. Thus, we can repeat the above logic to obtain that the $k$-th symmetric sums of $a_{1}^{-1}, \ldots, a_{2 n}^{-1}$ are also all zero for $k=1, \ldots, n$. However, these are simply the $(2 n-k)$-th symmetric sums of $a_{1}, \ldots, a_{2 n}$ (divided by $a_{1} \cdots a_{2 n}$ ), so the first $2 n-1$ symmetric sums of $a_{1}, \ldots, a_{2 n}$ are all zero. This implies that $a_{1}, \ldots, a_{2 n}$ form a regular $2 n$-gon centred at the origin.

We will encode all of these constraints into our polynomial. More explicitly, write $a_{r}=x_{r}+y_{r} i$; then the constraint $a_{1}^{k}+\cdots+a_{2 n}^{k}=0$ can be expressed as $p_{k}+q_{k} i=0$, where $p_{k}$ and $q_{k}$ are real polynomials in the coordinates. To incorporate this, simply impose the constraints $p_{k}=0$ and $q_{k}=0$; these are conditions of degree $k \leq n$, so their squares are all of degree at most $2 n$.

To recap, taking the sum of squares of all of these constraints gives a polynomial $f$ of degree at most $2 n$ which works whenever $A_{1}+\cdots+A_{2 n}=0$. Finally, the centroid-shifting trick gives a polynomial which works in general, as wanted.

Remark 1. Here is a more detailed approach of the mirror-reflection argument. Let $r e^{i \theta}$ be the polar representation of the point $P$. The polar representations of its mirrored images are then

$$
\begin{array}{ll}
r e^{i \theta}, & r e^{-i \theta}, \quad r e^{i\left(\frac{2 \pi}{n}+\theta\right)}, \quad r e^{i\left(\frac{2 \pi}{n}-\theta\right)} \\
\ldots, & r e^{i\left(\frac{2(n-1) \pi}{n}+\theta\right)}, \quad r e^{i\left(\frac{2(n-1) \pi}{n}-\theta\right)}
\end{array}
$$

Clearly, they are all linear with respect to $P$ and lie on the circle of radius $r$ centred at the origin. As listed above, the $2 n$ images are not necessarily in
circular order around the circle. For convenience, assume $0 \leq \theta \leq \frac{\pi}{n}$, so the list now displays them in circular order. These images form the vertices of a regular $2 n$-gon if and only if the angle between every two consecutive terms in the list (read circularly) is $\frac{\pi}{n}$. This is clearly the case if and only if $\theta=\frac{\pi}{2 n}$. Consequently, the images are the vertices of a regular $2 n$-gon if and only if $P$ lies on the internal bisector of the angle formed by some pair of consecutive mirrors.

Remark 2. We sketch here some versions of the arguments in the solution above.

To show that $\operatorname{deg} f \geq 2 n$, we use the same constancy of sign claim and the convention that the polynomial is a function of points ( $=$ pairs of coordinates) $A_{1}, A_{2}, \ldots, A_{2 n}$. Assume that the values of $f$ are all non-negative.

Write $B(\phi)=(\cos \phi, \sin \phi)$. Choose a substitution $A_{2 i-1}=B\left((2 i-1) \frac{\pi}{n}+\phi\right)$ and $A_{2 i}=$ $B\left(2 i \frac{\pi}{n}-\phi\right), i=1,2, \ldots, n$. Notice that the coordinates of the points $A_{1}, A_{2}, \ldots, A_{2 n}$ are all linear functions in $c=\cos \phi$ and $s=\sin \phi$, so, substituting these expressions into $f$, we get a polynomial $g(c, s)$ with $\operatorname{deg} g \leq \operatorname{deg} f$.

Now, the values of $g$ are all non-negative (each being one of $f$ ), and, on the circle $c^{2}+s^{2}=1$, it vanishes at exactly $2 n$ points, namely, $(c, s)=$ $\left(\cos \frac{\pi}{n} k, \sin \frac{\pi}{n} k\right), k=1, \ldots, 2 n$. We show that these properties already yield $\operatorname{deg} g \geq 2 n$.

Obviously, if $g(c, s)$ possesses the properties listed above, then so does $g(c,-s)$, and hence so does $\bar{g}(c, s)=g(c, s)+g(c,-s)$.

The polynomial $\bar{g}$ is even in $s$, so it in fact depends only on $s^{2}$, and we may plug $s^{2}=1-c^{2}$ into it, to obtain a polynomial $h(c)$ with $\operatorname{deg} h \leq \operatorname{deg} g$ which is non-negative on $[-1,1]$ and vanishes on this segment exactly at $c=\cos \frac{\pi}{n} k$. These are $n+1$ such points, and, except $c= \pm 1$, they should all be roots of $h$ of even multiplicity, due to sign conservation. All in all, this provides $2 n$ roots of $h$, counted with multiplicity, hence $\operatorname{deg} f \geq \operatorname{deg} g \geq \operatorname{deg} h \geq 2 n$, as desired.

For a bit alternative construction of a suitable $f$, one may notice that the Lemma in the above solution can be changed to impose vanishing of the elementary symmetric polynomials $\sigma_{i}\left(a_{1}, a_{2}, \ldots, a_{2 n}\right)$, $i=1,2, \ldots, n$, instead of Newton sums. Indeed, if the $\sigma_{i}$ all vanish, then so do the polynomials

$$
\sigma_{i}\left(\bar{a}_{1}, a_{2}, \ldots, \bar{a}_{2 n}\right)=\frac{\left|a_{1}\right|^{2 i} \sigma_{2 n-i}\left(a_{1}, a_{2}, \ldots, a_{2 n}\right)}{\bar{a}_{1} \bar{a}_{2} \ldots \bar{a}_{2 n}}
$$

so $\sigma_{i}\left(a_{1}, \ldots, a_{2 n}\right)$ also vanishes for $i=n+1, \ldots, 2 n-$

1. Hence $a_{1}, a_{2}, \ldots, a_{2 n}$ are the roots of $z^{2 n}-\left|a_{1}\right|^{n}$, as desired.

problem_match: Problem 3.