Is there any mathematical way to find the integer numbers that solve the following equation:
$$217 = (20x+3)r+x$$
Is there any mathematical way to find the integer numbers that solve the following equation:
$$217 = (20x+3)r+x$$
HINT:
$$\implies r=\frac{217-x}{20x+3}$$
If integer $d$ divides both the numerator & the denominator; it will divide
$\displaystyle(217-x)\cdot20+(20x+3)\cdot1=4343=43\cdot101$
So, $\displaystyle20x+3$ must divide $4343$ to keep $r$ an integer
Fortunately, the number of divisors are limited namely, $\displaystyle\pm1,\pm4343,\pm43,\pm101$
Again $\displaystyle\pm1,\pm101\equiv\pm1\pmod{20};$ and $\displaystyle-43,-4343\equiv-3\pmod{20}$ unlike $\displaystyle20x+3\equiv3$ which leaves only two options, right?
$$217 = (20x+3)r+x\\ 217=20xr+3r+x$$
Now $$(5x+\frac{3}{4})(4r+\frac{1}{5})=20xr+3r+x+\frac{3}{20}$$
Therefore $$217+\frac{3}{20}=(5x+\frac{3}{4})(4r+\frac{1}{5})$$
Multiplying both sides by $20$ we get $$4343=(20x+3)(20r+1)$$
There are only few ways of writing $4343$ as a product of two integers, in each case solve. Note that the product has to be of terms of the form $1 \pmod{20}$ and $3 \pmod{20}$.
P.S. Here is a faster way to get to the product: $$217 = (20x+3)r+x$$ Note that $x=\frac{(20x+3)-3}{20}$. Therefore $$217 = (20x+3)r+\frac{(20x+3)-3}{20}=(20x+3)(r+\frac{1}{20})-\frac{3}{20}$$
Move $\frac{3}{20}$ on the other size and multiply by $20$.
Hint $\ $ Completing a square generalizes to completing a product
$$\begin{eqnarray} &&axy + bx + cy\, =\, d,\ \ a\ne 0\\ \overset{\times\,a}\iff &&\!\!\! (ax+c)(ay+b)\, =\, ad+bc\end{eqnarray}\qquad\qquad$$
Your $\,ad\!+\!bc\,$ is a product of two primes, so LHS factors are highly constrained.