We are looking for an algorithm solving the following problem.
Given a sequence $ 0 < x_1< \dots < x_n $ find a sequence $0 < y_1 < \dots < y_n$ such that $\forall j \in \{2, \dots, n-1\}, i \in \{1, \dots, j-1\}, y \in [y_j, y_{j+1}[ \quad \left\lfloor \frac{y}{y_i} \right\rfloor= \left\lfloor \frac{y_{j+1}}{y_i} \right\rfloor ,$
while minimizing $\sum_{i=1}^n a_i |y_i - x_i| $ with $a_1,\dots,a_n \in \mathbb{R}^+$.
The distance may be replaced by another of the same spirit if it allows for a nice solution.
Here is a solution, likely sub-optimal.
$ \forall i \in \{1, \dots, n-2\}, \; \text{let} \; f_i: x \mapsto (\left\lfloor {x}/{x_i} \right\rfloor + 1) \; x_i$.
Another solution is to correct $ x_2 $: