Long division with integers Consider the long division of 237 with divisor a natural number $K$. If the quotient is $Q$ and the remainder is $R$, find all possible values of $K$, such that $K, Q, R$, not necessarily in this order, form a Geometric Progression (GP).
I have found 15, 78 and 236 but can't think of an analytical approach.
We have $237 = K*Q + R$ and
$1 \leq K \leq 237$
Also $1 \leq Q \leq 237$
and
$1 \leq R \leq 118$ where $118$ is the integer part of $\frac {237}{2}$.
Therefore
$119 \leq K*Q \leq 237$
In order for $K, Q, R$ to be in GP, any of 2 of $\frac {K}{Q}$, $\frac {K}{R}$, $\frac {Q}{R}$ or $\frac {Q}{K}$, $\frac {R}{K}$, $\frac {R}{K}$ must be equal.
Clearly the condition is met if any 2 of $K, Q, R$ are equal.
Can you please provide a full solution?
 A: $$237 = KQ + R$$ Since $R < K$, there are essentially two cases:
Case $1$: $Q < R < K$. Then $KQ = R^2$. Now $237 = KQ + R = R^2 + R$, which is a quadratic equation with no integer roots.
Case $2$: $R < Q < K$. Then $KR = Q^2$. Now $237 < KQ + K = K(Q+1) \le K^2$, so $K \ge 16$.
We also have $Q^2 \ge K$. This gives $237 = KQ + R > K^{3/2}$, so $K < 237^{2/3} \approx 38.29\dots$.
As the largest number in a GP, $K$ cannot be squarefree. Hence the possible $K$'s to test are:
$$16,18,20,24,25,27,28,32,36$$
for which their corresponding $Q$'s are:
$$14,13,11,9,9,8,8,7,6$$
which, weirdly, no GPs are formed. So there are no solutions where $K, R, Q$ are distinct.

It seems that equality is allowed. Even so, we can only have either $R=Q$ or $K=Q$.
For $R = Q$, we have $237 = (K+1)R$ and $K>R$. We also have $237 = 237 \times 1 = 79 \times 3$, so we either have $K = 236$ or $78$.
For $K = Q$, we have $237 = K^2 + R < K(K+1) < (K+1)^2$. This shows that $K < \sqrt{237} < K+1$, so $K = \lfloor\sqrt{237}\rfloor=15$.
