What happens when we (incorrectly) make improper fractions proper again? Many folks avoid the "mixed number" notation such as $4\frac{2}{3}$ due to its ambiguity. The example could mean "$4$ and two thirds", i.e. $4+\frac{2}{3}$, but one may also be tempted to multiply, resulting in $\frac{8}{3}$.
My questions pertain to what happens when we iterate this process -- alternating between changing a fraction
to a mixed number, then "incorrectly" multiplying the mixed
fraction. The iteration terminates when you arrive at a proper
fraction (numerator $\leq$ denominator) or an integer. I'll "define" this process via sufficiently-complicated example:
$$\frac{14}{3} \rightarrow 4 \frac{2}{3} \rightarrow \frac{8}{3} \rightarrow 2 \frac{2}{3} \rightarrow \frac{4}{3} \rightarrow 1\frac{1}{3}\rightarrow \frac{1}{3}.$$

*

*Does this process always terminate?


*For which $(p,q)\in\mathbb{N}\times(\mathbb{N}\setminus\{0\})$ does this process, with initial iterate $\frac{p}{q}$, terminate at $\frac{p \mod q}{q}$?
 A: Partial answer for 2: if $q = 2$, the process will terminate at $\frac12$ iff $p = 2^k - 1 \, (k \in \mathbb{N})$ and at an integer otherwise. This is because the only way to end up with a $1$ in the numerator is by having an integer part of $1$ and a numerator of $1$, so $1\frac12 = \frac32$. The only way to end up at $\frac32$ is from $3\frac12$, etc. It doesn't matter that $15 = 3 \cdot 5$, you can't have anything other than $1$ in the numerator.
So if $q = 2$, the final numerator is, modulo q, equal to the original $p$ iff $p$ is even or $p = 2^k - 1$.

For other $q$, it's much harder to find a general 'formula', but as @isaacg notes, the case above can be generalized to numbers of the form $p_k=\frac{q^k-1}{q-1}$:
$$\frac{q^k-1}{q-1}=\frac{qq^{k-1}-q+q-1}{q-1}=q\frac{q^{k-1}-1}{q-1}+1=qp_{k-1}+1$$
so $p_k \equiv 1 \pmod q$, and the improper fraction $\frac{p_k}{q}$ is equal to $p_{k-1}\frac1q$ which becomes $\frac{p_{k-1}}{q}$ in the next step, and we end up with $\frac1q$.
Those are not the only cases, e.g. $\frac53 \to 1\frac23 \to \frac23$ is another 'proper' (non-integer-ending) example.
A: 

*

*Does this process always terminate?


Yes. The process described is simply the evaluation of the recurrence relation...
$$a_{n+1}=\lfloor a_n\rfloor(a_n-\lfloor a_n\rfloor);\quad a_0=\frac{p}{q}$$
...where $\lfloor\cdot\rfloor$ is the floor function, while $a_n>0$.
To show that the process terminates, it suffices to show that there is some $n$ such that $a_n=0$.
A proof-sketch follows:
Suppose that there is some $n$ such that $a_n$ is an integer. Then $a_{n+1}=0$ and we are done.
Suppose that there is no $n$ such that $a_n$ is an integer. Let $c=\max\{a_n-\lfloor a_n\rfloor:n\in\Bbb{N}\}$ (note that $c<1$). It follows that...
$$a_{n+1}\le\lfloor a_n\rfloor c\le a_nc$$
Because $a_{n+1}=a_nc$ has closed form $a_n=a_0c^n$, we know that $a_n\le a_0c^n$. Since $\lim_{n\to\infty}a_0c^n=0$ and $0\le a_n$ for all $n$, it follows that $\lim_{n\to\infty}a_n=0$. By definition of the limit of a sequence, there must exist some $n$ such that $a_n-0<1$. Let $k$ be the least such $n$, then $a_{k+1}=0$ and we are done.
The convention employed @GeoffreyTrang can be used for dealing with negative rationals.



*For which $(p,q)\in\mathbb{N}\times(\mathbb{N}\setminus\{0\})$ does this process, with initial iterate $\frac{p}{q}$, terminate at $\frac{p \mod q}{q}$?


It is easier to consider the pairs for which the process doesn't terminate at $\frac{p\mod q}{q}$.
To start with, note let $h(p,q)$ be the last value prior to termination, as described above. It is worth noting that $h(p,q)=h(np,nq)$ for any $n\in\Bbb{Z}^+$ - so it is only necessary to consider the proportion between $p$ and $q$. We can identify each such proportion with a line through $\Bbb{N}\times\Bbb{Z}^+$.
(more to follow)
(see @Paul 's answer for solution)
A: Yes, the process does always terminate.
Here's why:
Consider the mixed number $a\frac{b}{c}$, where $0 \le b < c$ and $a > 0$. Then, it is clear that $ab < ac+b$, and so the process always continues to lead to smaller and smaller fractions with the same denominator $c$ until the numerator finally becomes smaller than $c$.
In case of a negative mixed number $-a\frac{b}{c}$, remember that this means "$-(a+\frac{b}{c})$", not "$(-a)+\frac{b}{c}$". But one can easily ignore the negative sign, so without loss of generality, one can consider positive mixed numbers only.
