Shift Modulo Operation
Let positive integer $m$ be a base and function $f(x,m)$ is defined over positive integers $x,m$ such that
$f(x, m) = x$, if $x < m$
$f(x, m) = f( \lfloor x/m \rfloor + x \% m, m)$, if $x \ge m$
Without $\lfloor x/m \rfloor$, the function $f$ is the same as the Traditional Modulo Operation.
This function is interesting and may have some properties, here is the question.
Prove (or disprove) that for any two primes $p, q ~ (p<q) $, let $m = q+1$, the numbers $\{ f(k p,m) | ~0 < k < m, k \in \mathbb{N} \}$ are distinct.
In other words, $p$ represents a permutation.
For example, $p = 5, q = 7, m = 8$
$\{ f(k p,m) | ~0 < k < m, k \in \mathbb{N} \}$ = $\{ 5, 3, 1, 6, 4, 2, 7 \}$
Update: Your function $f(x,m)$ recursively adds the last digit in base $m$ to the value coming from removing that digit, until just $1$ digit remains. Similar to how casting out nines can check the digits of a number in base $10$ to find the remainder when it's divided by $9$, since $q = m - 1$, you have
$$f(kp,m) \equiv kp \pmod{q}$$
With $q$ being prime, and $p$ being relatively prime to it, this means the set of $f(kp,m)$ for $1 \le k \le q$, where you get $1 \le f(kp,m) \le q$, forms a complete residue system modulo $q$, so each value is distinct.
My quite long, more detailed, original answer is below.
The statement you're asking about is true not only for primes $p \lt q$ but, more generally, for any integer $p$ which doesn't have $q$ as a factor, but I will just consider $1 \le p \lt q$ here for simplicity. First, you have
$$kp = am + b, \; 0 \le b \lt m \tag{1}$$
If $kp \lt m$, then $a = 0$, so $b = a + b$ and you have
$$f(kp,m) = a + b \tag{2}\label{eq2A}$$
If $kp \ge m$, then $f(kp,m) = f(a + b,m)$. If $a + b \lt m$, then \eqref{eq2A} still holds. Otherwise, note for $0 \lt k \lt m$, you have $0 \lt kp \lt m^2$. Thus, $a \lt m$, so with $b \lt m$, you have $m \le a + b \lt 2m - 1$. Thus, you have $a + b = m + (a + b - m)$, with $0 \le a + b - m \lt m - 1$, so
$$f(kp,m) = f(m + (a + b - m),m) = f(1 + (a + b - m),m) = 1 + (a + b - m) \tag{3}\label{eq3A}$$
Now, consider $0 \lt k_1 \lt m$ and $0 \lt k_2 \lt m$, with $k_1 \neq k_2$, where
$$k_1p = a_1m + b_1, \; 0 \le b_1 \lt m \tag{4}$$
$$k_2p = a_2m + b_2, \; 0 \le b_2 \lt m \tag{5}$$
$$f(k_1p,m) = f(k_2p,m) \tag{6}\label{eq6A}$$
Note you also have
$$\begin{equation}\begin{aligned} k_1p - k_2p & = a_1m + b_1 - (a_2m + b_2) \\ (k_1 - k_2)p & = (a_1 - a_2)m + (b_1 - b_2) \end{aligned}\end{equation}\tag{7}\label{eq7A}$$
There are $3$ basic cases to consider.
Case $1$: $a_1 + b_1 \lt m$ and $a_2 + b_2 \lt m$
Here, \eqref{eq2A} applies to both sides of \eqref{eq6A} giving
$$\begin{equation}\begin{aligned} a_1 + b_1 & = a_2 + b_2 \\ b_1 - b_2 & = a_2 - a_1 \end{aligned}\end{equation}\tag{8}\label{eq8A}$$
Substituting \eqref{eq8A} into \eqref{eq7A} gives
$$\begin{equation}\begin{aligned} (k_1 - k_2)p & = (a_1 - a_2)m + (a_2 - a_1) \\ (k_1 - k_2)p & = (a_1 - a_2)m + (-1)(a_1 - a_2) \\ (k_1 - k_2)p & = (a_1 - a_2)(m - 1) \\ (k_1 - k_2)p & = (a_1 - a_2)q \end{aligned}\end{equation}\tag{9}$$
Since $q$ is a prime, by Euclid's lemma, $q \mid p$ or $q \mid k_1 - k_2$. Since $1 \le p \lt q$, this means $q \not\mid p$, but you also have $-q \lt k_1 - k_2 \lt q$, but since $k_1 \neq k_2$, you have $q \not\mid k_1 - k_2$ as well. This shows \eqref{eq6A} can't hold.
Case $2$: $a_1 + b_1 \lt m$ and $a_2 + b_2 \ge m$, or $a_1 + b_1 \ge m$ and $a_2 + b_2 \lt m$
Here, with the first part, i.e., $a_1 + b_1 \lt m$ and $a_2 + b_2 \ge m$, \eqref{eq2A} applies to the LHS and \eqref{eq3A} applies to the RHS of \eqref{eq6A} giving
$$\begin{equation}\begin{aligned} a_1 + b_1 & = 1 + (a_2 + b_2 - m) \\ b_1 - b_2 & = a_2 - a_1 + (-1)(m - 1) \\ b_1 - b_2 & = a_2 - a_1 - q \end{aligned}\end{equation}\tag{10}\label{eq10A}$$
Substituting \eqref{eq10A} into \eqref{eq7A} gives
$$\begin{equation}\begin{aligned} (k_1 - k_2)p & = (a_1 - a_2)m + (a_2 - a_1) - q \\ (k_1 - k_2)p & = (a_1 - a_2)(m - 1) - q \\ (k_1 - k_2)p & = (a_1 - a_2 - 1)q \end{aligned}\end{equation}\tag{11}$$
As before, this means $q \mid k_1 - k_2$ or $q \mid p$, but neither are possible, so this case can't hold. Note by symmetry the second part, i.e., $a_1 + b_1 \ge m$ and $a_2 + b_2 \lt m$, gives the same result.
Case $3$: $a_1 + b_1 \ge m$ and $a_2 + b_2 \ge m$
Here, \eqref{eq3A} applies to both sides of \eqref{eq6A} giving
$$\begin{equation}\begin{aligned} 1 + (a_1 + b_1 - m) & = 1 + (a_2 + b_2 - m) \\ a_1 + b_1 & = a_2 + b_2 \\ b_1 - b_2 & = a_2 - a_1 \end{aligned}\end{equation}\tag{12}\label{eq12A}$$
Note \eqref{eq12A} is the same as \eqref{eq8A}, so the same result occurs, i.e., that \eqref{eq7A} cannot be true in this case.
Since all possible cases have been considered, this proves if $k_1 \neq k_2$, then $f(k_{1}p, m) \neq f(k_{2}p, m)$, confirming