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

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

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$$...

$$m(n-m)=-11n+8\implies n =\frac {m^2+8}{m+11}\implies$$ $$n=m-11+\frac {129}{m+11}\implies$$

$$m-n=11-\frac {129}{m+11}$$ The only integral positive solutions are $$(m,n)=(32,24),(118,108)$$

Thus the desired sum is $$18$$

Hint: Write your equation in the form $$n=m-11+\frac{129}{m+11}$$