Let $m$ and $n$ be positive integers such that $m(n-m)=-11n+8$ . Find the sum of all possible values of $m-n$.

contest-mathelementary-number-theorypolynomialsquadratics

Let $m$ and $n$ be positive integers such that $m(n-m)=-11n+8$ . Find the sum of
all possible values of $m-n$.

after manipulation you get the quadratic $0=m^2-mn+(8-11n)$
from that you get $m=\frac{n \pm\sqrt{n^2-4(8-11n)}}{2}$

but Im not sure how to derive all the solutions from this, hints, suggestions and solutions would all be appreciated

taken from the 2018 BIMC
https://chiuchang.org/imc/wp-content/uploads/sites/2/2018/07/BIMC-2018_Keystage-3_Individual.x17381.pdf

Best Answer

Hint:

It is better to expres $n$ in terms of $m$ and then use divisibility properties $$n = {m^2+8\over m+11} \implies m+11\mid m^2+8$$

Notice $m+11\mid m^2-121$ so $m+11\mid 129=3\cdot 43$ so $m+11\in\{1,3,43,129\}$ so $m=32$ or $m=118$...