Problem 4. We say a 2023-tuple of nonnegative integers $\left(a_{1}, a_{2}, \ldots a_{2023}\right)$ is sweet if the following conditions hold:

- $a_{1}+a_{2}+\ldots+a_{2023}=2023$,
- $\frac{a_{1}}{2^{1}}+\frac{a_{2}}{2^{2}}+\ldots+\frac{a_{2023}}{2^{2023}} \leqslant 1$.

Determine the greatest positive integer $L$ such that

$$
a_{1}+2 a_{2}+\ldots+2023 a_{2023} \geqslant L
$$

holds for every sweet 2023-tuple $\left(a_{1}, a_{2}, \ldots, a_{2023}\right)$.

(Ivan Novak)
Solution. Let $a_{1}, a_{2}, \ldots$ be a sweet sequence for which the least value $L$ of $a_{1}+2 a_{2}+3 a_{3}+\ldots$ is achieved.

Suppose that there are two nonconsecutive indices $i0$.

Consider the sequence

$$
\left(a_{1}, a_{2}, \ldots, a_{i-1}, a_{i}-1, a_{i+1}+2, a_{i+2}, \ldots, a_{k-1}, a_{k}-1, a_{k+1}, \ldots\right)
$$

i.e. the sequence in which the $i$-th and $k$-th term are reduced by 1 and the $i+1$-th term is increased by 2 .

We claim that this sequence is also sweet and that it achieves the value not greater than $L$.

The sum of its elements is unchanged so the first condition is satisfied.

For the second condition, note that

$$
\frac{a_{i}-1}{2^{i}}+\frac{a_{i+1}+2}{2^{i+1}}+\frac{a_{k}-1}{2^{k}}=\frac{a_{i}}{2^{i}}+\frac{a_{i+1}}{2^{i+1}}+\frac{a_{k}}{2^{k}}-\frac{1}{2^{k}}
$$

so the sum in the second condition decreases, so it remains smaller than 1.

Finally, we claim that the value of the sum we're minimising didn't increase. Indeed, we have

$$
i\left(a_{i}-1\right)+(i+1)\left(a_{i+1}+2\right)+k\left(a_{k}-1\right)=i a_{i}+(i+1) a_{i+1}+k a_{k}-(k-i-2)
$$

and since $k \geqslant i+2$, this means the sum didn't increase.

Repeating this transformation finitely many times, we obtain a sequence which obtains the minimum and which doesn't have two nonconsecutive indices $i0$. Thus, it suffices to check sequences of the form

$$
(0,0, \ldots, 0, a, b, 0,0, \ldots)
$$

with $i-1$ leading zeroes for some positive integer $i$, and with $a>0, b \geqslant 0$.

6 points.

In this case, we have the conditions

$$
\begin{gathered}
a+b=2023 \\
2 a+b \leqslant 2^{i+1}
\end{gathered}
$$

and we're minimising the expression

$$
f(a, b, i)=i a+(i+1) b=2023 i+b
$$

Since $0 \leqslant b2023$, which holds if and only if $i+1 \geqslant 11$, i.e. we must check $i=10$.

3 points.

When $i=10$, we have $a+b=2023,2 a+b \leqslant 2048$, which gives $b \geqslant 1998$, or

$$
10 a+11 b \geqslant 20230+1998=22228
$$

This value can be obtained for $a=25$ and $b=1998$, so we conclude that $L=22228$.

1 point.

## Notes on marking:

- In the first part worth 6 points, 2 points will be awarded if the solution states that we can WLOG have equality in (2).
- Failed attempts of smoothing the sequence will be worth points depending on how close is it to the correct one (1 or 2 points). If it also contains first remark, the total sum is $1+$ pts on smoothing (not completely additive with smoothing)

![](https://cdn.mathpix.com/cropped/2024_04_28_94515145d56931ee5dd8g-5.jpg?height=348&width=375&top_left_y=177&top_left_x=178)