Let $\frac{p}{q}$ be a positive (reduced) rational. Define $f_{p/q}(k) = 2 \{ \frac{p(k-1)}{q} \} - \{ \frac{pk}{q} \} - \{ \frac{p(k-2)}{q} \}$ for $2 \leqslant k \leqslant q-1$ and $f_{p/q}(q) = 2 \{ \frac{p(q-1)}{q} \} - \{ \frac{p(q-2)}{q} \} - 1$, where $\{ \cdot \}$ denotes the fractional part function. I've tested the following conjecture to many millions of combinations of $p$ and $q$, and it appears to hold:
For any positive rational $\frac{p}{q}$, one has $f_{p/q}(2), \dots, f_{p/q}(q-1), f_{p/q}(q) \in \{-1,0,1\}$.
Is there an obvious proof of this supposed fact?
Update: I've plotted one example below ($k = 3$, blue = $-1$, white $= 0$, orange $= 1$).
MatrixPlot[ Table[k = 3; 2 FractionalPart[p (k - 1)/q] - FractionalPart[p (k - 2)/q] - FractionalPart[p k/q], {p, 1, 1000}, {q, 1, 1000}]