Problem

Source: Bulgarian Autumn Tournament 2022 8.4

Tags: number theory, Sequences



Find the number of sequences with $2022$ natural numbers $n_1, n_2, n_3, \ldots, n_{2022}$, such that in every sequence: $\bullet$ $n_{i+1}\geq n_i$ $\bullet$ There is at least one number $i$, such that $n_i=2022$ $\bullet$ For every $(i, j)$ $n_1+n_2+\ldots+n_{2022}-n_i-n_j$ is divisible to both $n_i$ and $n_j$