Question. How can we prove that this function is non-decreasing?
That is:
$$ f: \Bbb{R} \to \Bbb{Z} \\ f(x) = [\frac{x}{1}] - [\frac{x-1}{2}] - [\frac{x - 1}{3}] - [\frac{x - 2}{3}] - [\frac{x - 1}{5}] - [\frac{x - 4}{5}] \\ + [\frac{x - 1}{6}] + [\frac{x - 5}{6}] + [\frac{x-1}{10}] + [\frac{x - 9}{10}] + [\frac{x - 1}{15}] + [\frac{x-4}{15}] + [\frac{x - 11}{15}] \\ - [\frac{x - 1}{30}] - [\frac{x - 11}{30}] - [\frac{x - 19}{30}] - [\frac{x - 29}{30}] $$
or more compactly:
$$ f(x) = \sum_{d \mid p_3\#}(-1)^{\omega(d)}\sum_{0 \leq r \lt d \\ r^2 = 1 \pmod d}\left\lfloor \frac{x - r}{d}\right\rfloor $$
By this very elegant MSE answer: obviously there is a trend line, and the slope of this trend line can be computed as:
$$ m = \sum_{d\mid p_3\#} \frac{(-1)^{\omega(d)}|H_d|}{d} $$
where $H_d = \{r \in \Bbb{Z} : 0 \leq r \lt d \ \wedge \ r^2 = 1 \pmod d\}$. It is known that $H_d$ is precisely the set of standard residues of a subgroup of $(\Bbb{Z}/d)^{\times}$, namely the subgroup of all $x \in \Bbb{Z}/d$ that square to $1$ modulo $d$.
