Determine the largest constant $C>0$ satisfying the following property:

For any 2023-tuple $\left(a_{1}, a_{2}, \ldots, a_{2023}\right)$ of strictly positive real numbers that are pairwise distinct, the following inequality holds:

$$
\frac{a_{1}}{\left|a_{2}-a_{3}\right|}+\frac{a_{2}}{\left|a_{3}-a_{4}\right|}+\ldots+\frac{a_{2023}}{\left|a_{1}-a_{2}\right|}>C
$$
Answer: 1012

We start by showing that $C \leqslant 1012$.

For this, we take $\varepsilon > 0$ sufficiently small. Thus, for any $C^{\prime} > 1012$, there exists $(a_{1}, \ldots, a_{2023})$ such that the left-hand side expression is less than $C^{\prime}$. Therefore, we have $C \geqslant 1012$.

We now prove that $C \geqslant 1012$. Let $(a_{1}, \ldots, a_{2023})$ be a set of strictly positive and distinct real numbers. To simplify notation, we set $a_{2024} = a_{1}$ and $a_{2025} = a_{2}$.

For all $i$, we define $f(i) = i+1$ if $a_{i+1} > a_{i+2}$ and $f(i) = i+2$ otherwise, so that $\frac{a_{i}}{\left|a_{i+1} - a_{i+2}\right|} \geqslant \frac{a_{i}}{a_{f(i)}}$.

The sequence $\left(f^{(n)}(1)\right)_{n}$ takes values in $\{1, \ldots, 2023\}$, so there exist $r < s$ such that $f^{(r)}(1) = f^{(s)}(1)$. By translating the sequence, we can assume that $r = 0$. The sequence is thus periodic, and we denote its period by $p$. Since $|f(i) - i| \leqslant 2$, we have $2p \geqslant 2023$, so $p \geqslant 1012$.

We can then conclude by the AM-GM inequality:

$$
\frac{a_{1}}{\left|a_{2} - a_{3}\right|} + \frac{a_{2}}{\left|a_{3} - a_{4}\right|} + \ldots + \frac{a_{2023}}{\left|a_{1} - a_{2}\right|} \geqslant \sum_{i=0}^{p-1} \frac{a_{f^{(i)}(1)}}{a_{f^{(i+1)}(1)}} \geqslant p \sqrt[p]{\prod \frac{a_{f^{(i)}(1)}}{a_{f^{(i+1)}(1)}}} = p \geqslant 1012
$$

Remark: The problem remains true if the reals are no longer assumed to be pairwise distinct (but requiring that the left-hand side is well-defined). The construction can then be simplified by

$$
a_{1} = \varepsilon^{2}, a_{2} = 1, a_{3} = 1 + \varepsilon \quad \text{and} \quad a_{2i} = \varepsilon, a_{2i+1} = 1 \quad \forall 2 \leqslant i \leqslant 1011
$$