Problem: Let $p$ be a prime number and let $s$ be an integer with $0 < s < p$.
Prove that there exist integers $m$ and $n$ with $0 < m < n < p$ and
\[ \left \{\frac{sm}{p} \right\} < \left \{\frac{sn}{p} \right \} < \frac{s}{p}  \]
if and only if $s$ is not a divisor of $p-1$.

Solution: It's equivalent to $ms \bmod p < ns \bmod p < s$,
where $x \bmod p$ means the remainder when $x$ is divided by $p$,
by slight abuse of notation.
We will assume $s \ge 2$ for simplicity,
since the case $s = 1$ is clear.

For any $x \in \{1, 2, \dots, s-1\}$
we define $f(x)$ to be the unique number in $\{1, \dots, p-1\}$
such that $s \cdot f(x) \bmod p = x$.
Then, $m$ and $n$ fail to exist exactly when
\[ f(s-1) < f(s-2) < \dots < f(1). \]

We give the following explicit description of $f$:
choose $t \equiv -s^{-1} \pmod p$, $0 < t < p$.
Then $f(x) = 1 + (s-x) \cdot t \bmod p$.
So our displayed inequality is equivalent to
\[ (1+t) \bmod p < (1+2t) \bmod p < (1+3t) \bmod p
  < \dots < (1+(s-1)t) \bmod p. \]
This just means that the sequence $1+kt$
never ``wraps around'' modulo $p$
as we take $k=1,2,\dots,s-1$.

Since we assumed $s \neq 1$, we have $0 < 1+t < p$.
Now since $1+kt$ never wraps around as $k=1,2,\dots,s-1$,
and increases in increments of $t$,
it follows that $1+kt < p$ for all $k = 1, 2, \dots, s-1$.
Finally, as $1+st \equiv 0 \pmod p$ we get $1+st=p$.

In summary, $m$, $n$ fail to exist
precisely when $1 + st = p$.
That is of course equivalent to $s \mid p-1$.